Ignore:
Timestamp:
07/25/06 16:54:28 (8 years ago)
Author:
xi
Message:

Add yaml_emitter_emit_* set of functions.

File:
1 edited

Legend:

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

    r211 r212  
    5858 */ 
    5959 
    60 YAML_DECLARE(char *) 
    61 yaml_strdup(const char *str) 
    62 { 
    63     return strdup(str); 
     60YAML_DECLARE(yaml_char_t *) 
     61yaml_strdup(const yaml_char_t *str) 
     62{ 
     63    if (!str) 
     64        return NULL; 
     65 
     66    return (yaml_char_t *)strdup((char *)str); 
    6467} 
    6568 
     
    390393    } 
    391394    STACK_DEL(emitter, emitter->indents); 
     395    yaml_event_delete(&emitter->event); 
    392396    while (!STACK_EMPTY(empty, emitter->tag_directives)) { 
    393397        yaml_tag_directive_t tag_directive = POP(emitter, emitter->tag_directives); 
     
    537541    assert(emitter);    /* Non-NULL emitter object expected. */ 
    538542 
    539     emitter->best_width = (width > 0) ? width : 0; 
     543    emitter->best_width = (width >= 0) ? width : -1; 
    540544} 
    541545 
Note: See TracChangeset for help on using the changeset viewer.