projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
* more modular file structure
[m6w6/ext-http]
/
phpstr
/
phpstr.c
diff --git
a/phpstr/phpstr.c
b/phpstr/phpstr.c
index 7c9bad0970f42a54e259b915278d6d11823a7224..286a190b3669119dd146118a56ced262b18a9ec3 100644
(file)
--- a/
phpstr/phpstr.c
+++ b/
phpstr/phpstr.c
@@
-11,7
+11,7
@@
PHPSTR_API phpstr *phpstr_init_ex(phpstr *buf, size_t chunk_size, zend_bool pre_alloc)
{
if (!buf) {
PHPSTR_API phpstr *phpstr_init_ex(phpstr *buf, size_t chunk_size, zend_bool pre_alloc)
{
if (!buf) {
- buf = e
calloc(1,
sizeof(phpstr));
+ buf = e
malloc(
sizeof(phpstr));
}
buf->size = chunk_size > 0 ? chunk_size : PHPSTR_DEFAULT_SIZE;
}
buf->size = chunk_size > 0 ? chunk_size : PHPSTR_DEFAULT_SIZE;
@@
-22,7
+22,7
@@
PHPSTR_API phpstr *phpstr_init_ex(phpstr *buf, size_t chunk_size, zend_bool pre_
return buf;
}
return buf;
}
-PHPSTR_API phpstr *phpstr_from_string_ex(phpstr *buf, char *string, size_t length)
+PHPSTR_API phpstr *phpstr_from_string_ex(phpstr *buf, c
onst c
har *string, size_t length)
{
buf = phpstr_init(buf);
phpstr_append(buf, string, length);
{
buf = phpstr_init(buf);
phpstr_append(buf, string, length);