Ignore:
Timestamp:
May 17, 2010 6:46:56 PM (12 years ago)
Author:
mmc
Message:

Fixed the Perl bindings to handle binary data properly. Users on vhub.org
stumbled into this. Image data was getting truncated on the first embedded
null byte, instead of keeping the entire length of the binary data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lang/perl/Rappture.xs

    r1095 r1716  
    3838        RETVAL = 0;
    3939
    40 const char *
     40SV *
    4141RpLibrary::get( path )
    4242const char *path
     
    4444        string result;
    4545        result = THIS->get(path);
    46         RETVAL = result.c_str();
     46        RETVAL = newSVpvn(result.data(),result.length());
    4747    OUTPUT:
    4848        RETVAL
Note: See TracChangeset for help on using the changeset viewer.