1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-01 01:14:22 +00:00

VS2010 build: Prepare compat/jansson-2.5.

Cherry-picked by veox.

Not a big fan of modifying compat libraries, makes it harder to maintain
later on. See if these changes are relevant upstream.
This commit is contained in:
Sanjin Trošelj 2014-01-27 18:22:40 +01:00 committed by Noel Maersk
parent 5ce16a44db
commit cf70796196
4 changed files with 5 additions and 5 deletions

View File

@ -365,7 +365,7 @@ static void lex_scan_string(lex_t *lex, json_error_t *error)
- two \uXXXX escapes (length 12) forming an UTF-16 surrogate pair
are converted to 4 bytes
*/
lex->value.string = jsonp_malloc(lex->saved_text.length + 1);
lex->value.string = (char *)jsonp_malloc(lex->saved_text.length + 1);
if(!lex->value.string) {
/* this is not very nice, since TOKEN_INVALID is returned */
goto out;

View File

@ -41,7 +41,7 @@ char *jsonp_strdup(const char *str)
if(len == (size_t)-1)
return NULL;
new_str = jsonp_malloc(len + 1);
new_str = (char *)jsonp_malloc(len + 1);
if(!new_str)
return NULL;

View File

@ -23,7 +23,7 @@ int strbuffer_init(strbuffer_t *strbuff)
strbuff->size = STRBUFFER_MIN_SIZE;
strbuff->length = 0;
strbuff->value = jsonp_malloc(strbuff->size);
strbuff->value = (char *)jsonp_malloc(strbuff->size);
if(!strbuff->value)
return -1;
@ -86,7 +86,7 @@ int strbuffer_append_bytes(strbuffer_t *strbuff, const char *data, size_t size)
new_size = max(strbuff->size * STRBUFFER_FACTOR,
strbuff->length + size + 1);
new_value = jsonp_malloc(new_size);
new_value = (char *)jsonp_malloc(new_size);
if(!new_value)
return -1;

View File

@ -229,7 +229,7 @@ const char *json_object_iter_key(void *iter)
if(!iter)
return NULL;
return hashtable_iter_key(iter);
return (char *)hashtable_iter_key(iter);
}
json_t *json_object_iter_value(void *iter)