projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
ifdef unused variables
[m6w6/ext-http]
/
phpstr
/
phpstr.h
diff --git
a/phpstr/phpstr.h
b/phpstr/phpstr.h
index 6844dd2590a99190b3ba96f4350ac80021efb50c..3a4f88b4794c32d6e402ba2c181bba5ff71495f1 100644
(file)
--- a/
phpstr/phpstr.h
+++ b/
phpstr/phpstr.h
@@
-4,8
+4,6
@@
#ifndef _PHPSTR_H_
#define _PHPSTR_H_
#ifndef _PHPSTR_H_
#define _PHPSTR_H_
-#include "php.h"
-
#ifndef PHPSTR_DEFAULT_SIZE
# define PHPSTR_DEFAULT_SIZE 256
#endif
#ifndef PHPSTR_DEFAULT_SIZE
# define PHPSTR_DEFAULT_SIZE 256
#endif
@@
-41,8
+39,15
@@
#ifndef pemalloc
# define pemalloc(s,p) malloc(s)
# define pefree(x,p) free(x)
#ifndef pemalloc
# define pemalloc(s,p) malloc(s)
# define pefree(x,p) free(x)
-# define perealloc(x,s,p)
e
realloc(x,s)
+# define perealloc(x,s,p) realloc(x,s)
# define perealloc_recoverable perealloc
# define perealloc_recoverable perealloc
+# define ecalloc calloc
+static inline void *estrndup(void *p, size_t s)
+{
+ char *r = (char *) malloc(s+1);
+ if (r) memcpy((void *) r, p, s), r[s] = '\0';
+ return (void *) r;
+}
#endif
#if defined(PHP_WIN32)
#endif
#if defined(PHP_WIN32)