Changeset 239 for libyaml/trunk/src/api.c
- Timestamp:
- 01/07/07 17:51:10 (6 years ago)
- File:
-
- 1 edited
-
libyaml/trunk/src/api.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libyaml/trunk/src/api.c
r238 r239 75 75 yaml_char_t **pointer, yaml_char_t **end) 76 76 { 77 void*new_start = yaml_realloc(*start, (*end - *start)*2);77 yaml_char_t *new_start = yaml_realloc(*start, (*end - *start)*2); 78 78 79 79 if (!new_start) return 0; … … 118 118 yaml_stack_extend(void **start, void **top, void **end) 119 119 { 120 void *new_start = yaml_realloc(*start, ( *end -*start)*2);120 void *new_start = yaml_realloc(*start, ((char *)*end - (char *)*start)*2); 121 121 122 122 if (!new_start) return 0; 123 123 124 *top = new_start + (*top -*start);125 *end = new_start + (*end -*start)*2;124 *top = (char *)new_start + ((char *)*top - (char *)*start); 125 *end = (char *)new_start + ((char *)*end - (char *)*start)*2; 126 126 *start = new_start; 127 127 … … 139 139 140 140 if (*start == *head && *tail == *end) { 141 void *new_start = yaml_realloc(*start, (*end - *start)*2); 141 void *new_start = yaml_realloc(*start, 142 ((char *)*end - (char *)*start)*2); 142 143 143 144 if (!new_start) return 0; 144 145 145 *head = new_start + (*head -*start);146 *tail = new_start + (*tail -*start);147 *end = new_start + (*end -*start)*2;146 *head = (char *)new_start + ((char *)*head - (char *)*start); 147 *tail = (char *)new_start + ((char *)*tail - (char *)*start); 148 *end = (char *)new_start + ((char *)*end - (char *)*start)*2; 148 149 *start = new_start; 149 150 } … … 153 154 if (*tail == *end) { 154 155 if (*head != *tail) { 155 memmove(*start, *head, *tail -*head);156 memmove(*start, *head, (char *)*tail - (char *)*head); 156 157 } 157 *tail -= *head -*start;158 *tail = (char *)*tail - (char *)*head + (char *)*start; 158 159 *head = *start; 159 160 } … … 250 251 } 251 252 252 if (size > (parser->input.string.end - parser->input.string.current)) { 253 if (size > (size_t)(parser->input.string.end 254 - parser->input.string.current)) { 253 255 size = parser->input.string.end - parser->input.string.current; 254 256 } … … 625 627 unsigned int width; 626 628 unsigned int value; 627 int k;629 size_t k; 628 630 629 631 octet = pointer[0]; … … 1117 1119 struct { 1118 1120 yaml_error_type_t error; 1119 } context ;1121 } context = { YAML_NO_ERROR }; 1120 1122 yaml_tag_directive_t *tag_directive; 1121 1123 … … 1382 1384 } 1383 1385 1386
Note: See TracChangeset
for help on using the changeset viewer.
