X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=perl-module%2FPSPP.xs;h=400aeda7b12ce45ada26c7dc138d8b5bf0224f4a;hb=5d5de1adfffc66bac5872b18b3766bc32bf3464d;hp=bf90d986f327b811fb5f67822d7cf5c332b0c0ca;hpb=38993354cabb6fc37bb882be92f9a49e9aeb4c88;p=pspp-builds.git diff --git a/perl-module/PSPP.xs b/perl-module/PSPP.xs index bf90d986..400aeda7 100644 --- a/perl-module/PSPP.xs +++ b/perl-module/PSPP.xs @@ -166,6 +166,8 @@ MODULE = PSPP MODULE = PSPP PACKAGE = PSPP +PROTOTYPES: ENABLE + void onBoot (ver) const char *ver @@ -654,9 +656,16 @@ CODE: if ( ifmt ) { struct substring ss = ss_cstr (SvPV_nolen (sv)); - if ( ! data_in (ss, LEGACY_NATIVE, ifmt->type, 0, 0, - case_data_rw (c, v), var_get_width (v), - dict_get_encoding (sfi->dict))) + char *error; + bool ok; + + error = data_in (ss, LEGACY_NATIVE, ifmt->type, + case_data_rw (c, v), var_get_width (v), + dict_get_encoding (sfi->dict)); + ok = error == NULL; + free (error); + + if ( !ok ) { RETVAL = 0; goto finish;