Ignore:
Timestamp:
12/27/07 07:05:17 (7 years ago)
Author:
xi
Message:

Completed the first phase of API refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libyaml/trunk/src/api.c

    r261 r263  
    173173 
    174174    memset(parser, 0, sizeof(yaml_parser_t)); 
    175     if (!BUFFER_INIT(parser, parser->raw_input, RAW_INPUT_BUFFER_CAPACITY)) 
     175    if (!STRING_INIT(parser, parser->raw_input, RAW_INPUT_BUFFER_CAPACITY)) 
    176176        goto error; 
    177     if (!BUFFER_INIT(parser, parser->input, INPUT_BUFFER_CAPACITY)) 
     177    if (!STRING_INIT(parser, parser->input, INPUT_BUFFER_CAPACITY)) 
    178178        goto error; 
    179179    if (!QUEUE_INIT(parser, parser->tokens, INITIAL_QUEUE_CAPACITY)) 
     
    207207    assert(parser); /* Non-NULL parser object expected. */ 
    208208 
    209     BUFFER_DEL(parser, parser->raw_input); 
    210     BUFFER_DEL(parser, parser->input); 
     209    STRING_DEL(parser, parser->raw_input); 
     210    STRING_DEL(parser, parser->input); 
    211211    while (!QUEUE_EMPTY(parser, parser->tokens)) { 
    212212        yaml_token_destroy(&DEQUEUE(parser, parser->tokens)); 
     
    358358 
    359359    memset(emitter, 0, sizeof(yaml_emitter_t)); 
    360     if (!BUFFER_INIT(emitter, emitter->output, OUTPUT_BUFFER_CAPACITY)) 
     360    if (!STRING_INIT(emitter, emitter->output, OUTPUT_BUFFER_CAPACITY)) 
    361361        goto error; 
    362     if (!BUFFER_INIT(emitter, emitter->raw_output, RAW_OUTPUT_BUFFER_CAPACITY)) 
     362    if (!STRING_INIT(emitter, emitter->raw_output, RAW_OUTPUT_BUFFER_CAPACITY)) 
    363363        goto error; 
    364364    if (!STACK_INIT(emitter, emitter->states, INITIAL_STACK_CAPACITY)) 
     
    388388    assert(emitter);    /* Non-NULL emitter object expected. */ 
    389389 
    390     BUFFER_DEL(emitter, emitter->output); 
    391     BUFFER_DEL(emitter, emitter->raw_output); 
     390    STRING_DEL(emitter, emitter->output); 
     391    STRING_DEL(emitter, emitter->raw_output); 
    392392    STACK_DEL(emitter, emitter->states); 
    393393    while (!QUEUE_EMPTY(emitter, emitter->events)) { 
Note: See TracChangeset for help on using the changeset viewer.