summaryrefslogtreecommitdiff
path: root/src/raptor_www.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2010-04-30 21:02:21 -0700
committerDave Beckett <dave@dajobe.org>2010-04-30 21:02:21 -0700
commit5a6055d4b9280d29e8a04aa72cac3701d33664f4 (patch)
treef852bf80621e8ea358b2b1356ba950dd987fd2ae /src/raptor_www.c
parentb992ec5f949cab41253d5df1b257291d63bdd306 (diff)
downloadraptor-5a6055d4b9280d29e8a04aa72cac3701d33664f4.tar.gz
Add typedef raptor_data_malloc_function
raptor_data_malloc_function: added for a malloc() signature function. (raptor_www_fetch_to_string, raptor_new_iostream_to_string): Use for argument malloc_handler.
Diffstat (limited to 'src/raptor_www.c')
-rw-r--r--src/raptor_www.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/raptor_www.c b/src/raptor_www.c
index 7417c8df..693e6d0f 100644
--- a/src/raptor_www.c
+++ b/src/raptor_www.c
@@ -661,7 +661,7 @@ raptor_www_fetch_to_string_write_bytes(raptor_www* www, void *userdata,
* @uri: raptor_uri to retrieve
* @string_p: pointer to location to hold string
* @length_p: pointer to location to hold length of string (or NULL)
- * @malloc_handler: pointer to malloc to use to make string (or NULL)
+ * @malloc_function: pointer to malloc() to use to make string (or NULL)
*
* Start a WWW content retrieval for the given URI, returning the data in a new string.
*
@@ -675,7 +675,7 @@ RAPTOR_EXTERN_C
int
raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri,
void **string_p, size_t *length_p,
- void *(*malloc_handler)(size_t size))
+ raptor_data_malloc_function const malloc_function)
{
raptor_stringbuffer *sb = NULL;
void *str = NULL;
@@ -698,7 +698,7 @@ raptor_www_fetch_to_string(raptor_www *www, raptor_uri *uri,
else {
size_t len = raptor_stringbuffer_length(sb);
if(len) {
- str = (void*)malloc_handler(len+1);
+ str = (void*)malloc_function(len+1);
if(str) {
raptor_stringbuffer_copy_to_string(sb, (unsigned char*)str, len+1);
*string_p=str;