Ignore:
Timestamp:
07/31/06 18:24:32 (8 years ago)
Author:
xi
Message:

Add two examples and prepare the build system for distribution.

File:
1 edited

Legend:

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

    r216 r219  
    812812yaml_scalar_event_initialize(yaml_event_t *event, 
    813813        yaml_char_t *anchor, yaml_char_t *tag, 
    814         yaml_char_t *value, size_t length, 
     814        yaml_char_t *value, int length, 
    815815        int plain_implicit, int quoted_implicit, 
    816816        yaml_scalar_style_t style) 
     
    824824    assert(value);      /* Non-NULL anchor is expected. */ 
    825825 
    826  
    827826    if (anchor) { 
    828827        if (!yaml_check_utf8(anchor, strlen((char *)anchor))) goto error; 
     
    835834        tag_copy = yaml_strdup(tag); 
    836835        if (!tag_copy) goto error; 
     836    } 
     837 
     838    if (length < 0) { 
     839        length = strlen((char *)value); 
    837840    } 
    838841 
Note: See TracChangeset for help on using the changeset viewer.