Changeset 243 for libyaml/trunk/src/api.c
- Timestamp:
- 01/08/07 13:33:55 (6 years ago)
- File:
-
- 1 edited
-
libyaml/trunk/src/api.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libyaml/trunk/src/api.c
r239 r243 1119 1119 struct { 1120 1120 yaml_error_type_t error; 1121 } context = { YAML_NO_ERROR };1121 } context; 1122 1122 yaml_tag_directive_t *tag_directive; 1123 1124 context.error = YAML_NO_ERROR; /* Eliminate a compliler warning. */ 1123 1125 1124 1126 assert(document); /* Non-NULL document object is expected. */ … … 1160 1162 1161 1163 YAML_DECLARE(yaml_node_t *) 1162 yaml_document_get_node(yaml_document_t *document, int node)1164 yaml_document_get_node(yaml_document_t *document, int index) 1163 1165 { 1164 1166 assert(document); /* Non-NULL document object is expected. */ 1165 1167 1166 if ( node > 0 && document->nodes.start + node<= document->nodes.top) {1167 return document->nodes.start + node- 1;1168 if (index > 0 && document->nodes.start + index <= document->nodes.top) { 1169 return document->nodes.start + index - 1; 1168 1170 } 1169 1171 return NULL; … … 1206 1208 1207 1209 if (!tag) { 1208 tag = YAML_DEFAULT_SCALAR_TAG;1210 tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG; 1209 1211 } 1210 1212 … … 1258 1260 1259 1261 if (!tag) { 1260 tag = YAML_DEFAULT_SEQUENCE_TAG;1262 tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG; 1261 1263 } 1262 1264 … … 1303 1305 1304 1306 if (!tag) { 1305 tag = YAML_DEFAULT_MAPPING_TAG;1307 tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG; 1306 1308 } 1307 1309
Note: See TracChangeset
for help on using the changeset viewer.
