Browse Source

64bits

pull/78/head
Jérôme Lebel Jérôme Lebel 12 years ago
parent
commit
d1e4a5a4a8
5 changed files with 7 additions and 7 deletions
  1. +1
    -1
      json_object.c
  2. +1
    -1
      json_object.h
  3. +1
    -1
      json_util.c
  4. +2
    -2
      printbuf.c
  5. +2
    -2
      printbuf.h

+ 1
- 1
json_object.c View File

@@ -642,7 +642,7 @@ struct json_object* json_object_new_string(const char *s)
return jso; return jso;
} }


struct json_object* json_object_new_string_len(const char *s, int len)
struct json_object* json_object_new_string_len(const char *s, size_t len)
{ {
struct json_object *jso = json_object_new(json_type_string); struct json_object *jso = json_object_new(json_type_string);
if(!jso) return NULL; if(!jso) return NULL;


+ 1
- 1
json_object.h View File

@@ -530,7 +530,7 @@ extern double json_object_get_double(struct json_object *obj);
*/ */
extern struct json_object* json_object_new_string(const char *s); extern struct json_object* json_object_new_string(const char *s);


extern struct json_object* json_object_new_string_len(const char *s, int len);
extern struct json_object* json_object_new_string_len(const char *s, size_t len);


/** Get the string value of a json_object /** Get the string value of a json_object
* *


+ 1
- 1
json_util.c View File

@@ -242,7 +242,7 @@ int json_parse_int64(const char *buf, int64_t *retval)
*/ */
if (orig_has_neg != recheck_has_neg || if (orig_has_neg != recheck_has_neg ||
strncmp(buf_sig_digits, buf_cmp_start, strlen(buf_cmp_start)) != 0 || strncmp(buf_sig_digits, buf_cmp_start, strlen(buf_cmp_start)) != 0 ||
((int)strlen(buf_sig_digits) != buf_cmp_len &&
(strlen(buf_sig_digits) != buf_cmp_len &&
isdigit((int)buf_sig_digits[buf_cmp_len]) isdigit((int)buf_sig_digits[buf_cmp_len])
) )
) )


+ 2
- 2
printbuf.c View File

@@ -88,9 +88,9 @@ size_t printbuf_memappend(struct printbuf *p, const char *buf, size_t size)
return size; return size;
} }


int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len)
int printbuf_memset(struct printbuf *pb, size_t offset, int charvalue, int len)
{ {
int size_needed;
size_t size_needed;


if (offset == -1) if (offset == -1)
offset = pb->bpos; offset = pb->bpos;


+ 2
- 2
printbuf.h View File

@@ -22,7 +22,7 @@ extern "C" {


struct printbuf { struct printbuf {
char *buf; char *buf;
int bpos;
size_t bpos;
size_t size; size_t size;
}; };


@@ -59,7 +59,7 @@ do { \
* If offset is -1, this starts at the end of the current data in the buffer. * If offset is -1, this starts at the end of the current data in the buffer.
*/ */
extern int extern int
printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len);
printbuf_memset(struct printbuf *pb, size_t offset, int charvalue, int len);


extern int extern int
sprintbuf(struct printbuf *p, const char *msg, ...); sprintbuf(struct printbuf *p, const char *msg, ...);


Loading…
Cancel
Save