~ubuntu-branches/ubuntu/wily/libsereal-encoder-perl/wily

« back to all changes in this revision

Viewing changes to Encoder.xs

  • Committer: Package Import Robot
  • Author(s): Alexandre Mestiashvili
  • Date: 2014-03-19 17:12:02 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140319171202-9uyoq1vscsw1tkth
Tags: 2.06-1
* Imported Upstream version 2.06
* d/control: added libsereal-decoder-perl to Build-Depends 
  needed to pass tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    assert(enc != NULL);
45
45
    if (items > 2 && SvOK(ST(2)))
46
46
      hdr_user_data_src = ST(2);
47
 
    srl_dump_data_structure(aTHX_ enc, src, hdr_user_data_src);
 
47
    enc = srl_dump_data_structure(aTHX_ enc, src, hdr_user_data_src);
48
48
    assert(enc->buf.pos > enc->buf.start);
49
49
    /* We always copy the string since we might reuse the string buffer. That means
50
50
     * we already have to do a malloc and we might as well use the opportunity to
61
61
  PPCODE:
62
62
    enc = srl_build_encoder_struct(aTHX_ opt);
63
63
    assert(enc != NULL);
64
 
    srl_dump_data_structure(aTHX_ enc, src, NULL);
 
64
    enc = srl_dump_data_structure(aTHX_ enc, src, NULL);
65
65
    /* Avoid copy by stealing string buffer if it is not too large.
66
66
     * This makes sense in the functional interface since the string
67
67
     * buffer isn't ever going to be reused. */
94
94
      hdr_user_data_src = NULL;
95
95
    enc = srl_build_encoder_struct(aTHX_ opt);
96
96
    assert(enc != NULL);
97
 
    srl_dump_data_structure(aTHX_ enc, src, hdr_user_data_src);
 
97
    enc = srl_dump_data_structure(aTHX_ enc, src, hdr_user_data_src);
98
98
    /* Avoid copy by stealing string buffer if it is not too large.
99
99
     * This makes sense in the functional interface since the string
100
100
     * buffer isn't ever going to be reused. */