diff options
author | Dave Beckett <dave@dajobe.org> | 2011-11-25 20:21:05 -0800 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2011-11-25 20:21:05 -0800 |
commit | 2c4d76240b70e9c794d983ca856ceaea8fe7ee5b (patch) | |
tree | c6e99a5aac96628ee3146fd42607095a2ff2a026 /src/raptor_sax2.c | |
parent | f3653ec0b7b5207734d0f7ec95b0f024bde0a016 (diff) | |
download | raptor-2c4d76240b70e9c794d983ca856ceaea8fe7ee5b.tar.gz |
Fix expat support
Diffstat (limited to 'src/raptor_sax2.c')
-rw-r--r-- | src/raptor_sax2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/raptor_sax2.c b/src/raptor_sax2.c index 90d04732..e2f87c4f 100644 --- a/src/raptor_sax2.c +++ b/src/raptor_sax2.c @@ -551,7 +551,7 @@ raptor_sax2_parse_chunk(raptor_sax2* sax2, const unsigned char *buffer, #ifdef RAPTOR_XML_EXPAT - rc = XML_Parse(xp, (char*)buffer, len, is_end); + rc = XML_Parse(xp, (char*)buffer, RAPTOR_BAD_CAST(int, len), is_end); if(!rc) /* expat: 0 is failure */ goto handle_error; if(is_end) @@ -627,8 +627,7 @@ raptor_sax2_parse_chunk(raptor_sax2* sax2, const unsigned char *buffer, char *error_buffer; error_length = strlen(error_message); - error_buffer = (char*)RAPTOR_MALLOC(cstring, - ERROR_PREFIX_LEN + error_length+1); + error_buffer = RAPTOR_MALLOC(char*, ERROR_PREFIX_LEN + error_length + 1); if(error_buffer) { memcpy(error_buffer, error_prefix, ERROR_PREFIX_LEN); memcpy(error_buffer + ERROR_PREFIX_LEN, error_message, error_length + 1); |