projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Updates to libhashkit.
[awesomized/libmemcached]
/
libmemcached
/
string.c
diff --git
a/libmemcached/string.c
b/libmemcached/string.c
index 33b9222a912418602beb5b969bcfdde21fadafa5..464d55c0c9878bd2fea2eb5252a55f00ae2e9530 100644
(file)
--- a/
libmemcached/string.c
+++ b/
libmemcached/string.c
@@
-29,7
+29,7
@@
inline static memcached_return_t _string_check(memcached_string_st *string, size
if (new_size < need)
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
if (new_size < need)
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
- new_value=
string->root->call
_realloc(string->root, string->string, new_size);
+ new_value=
libmemcached
_realloc(string->root, string->string, new_size);
if (new_value == NULL)
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
if (new_value == NULL)
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
@@
-49,7
+49,7
@@
static inline void _init_string(memcached_string_st *self)
self->end= self->string= NULL;
}
self->end= self->string= NULL;
}
-memcached_string_st *memcached_string_create(memcached_st *memc, memcached_string_st *self, size_t initial_size)
+memcached_string_st *memcached_string_create(
const
memcached_st *memc, memcached_string_st *self, size_t initial_size)
{
memcached_return_t rc;
{
memcached_return_t rc;
@@
-64,7
+64,7
@@
memcached_string_st *memcached_string_create(memcached_st *memc, memcached_strin
}
else
{
}
else
{
- self=
memc->call
_malloc(memc, sizeof(memcached_string_st));
+ self=
libmemcached
_malloc(memc, sizeof(memcached_string_st));
if (self == NULL)
{
if (self == NULL)
{
@@
-80,7
+80,7
@@
memcached_string_st *memcached_string_create(memcached_st *memc, memcached_strin
rc= _string_check(self, initial_size);
if (rc != MEMCACHED_SUCCESS)
{
rc= _string_check(self, initial_size);
if (rc != MEMCACHED_SUCCESS)
{
-
memc->call
_free(memc, self);
+
libmemcached
_free(memc, self);
return NULL;
}
return NULL;
}
@@
-134,7
+134,7
@@
char *memcached_string_c_copy(memcached_string_st *string)
if (memcached_string_length(string) == 0)
return NULL;
if (memcached_string_length(string) == 0)
return NULL;
- c_ptr=
string->root->call
_malloc(string->root, (memcached_string_length(string)+1) * sizeof(char));
+ c_ptr=
libmemcached
_malloc(string->root, (memcached_string_length(string)+1) * sizeof(char));
if (c_ptr == NULL)
return NULL;
if (c_ptr == NULL)
return NULL;
@@
-159,12
+159,12
@@
void memcached_string_free(memcached_string_st *ptr)
if (ptr->string)
{
if (ptr->string)
{
-
ptr->root->call
_free(ptr->root, ptr->string);
+
libmemcached
_free(ptr->root, ptr->string);
}
if (memcached_is_allocated(ptr))
{
}
if (memcached_is_allocated(ptr))
{
-
ptr->root->call
_free(ptr->root, ptr);
+
libmemcached
_free(ptr->root, ptr);
}
else
{
}
else
{