From 32708f0ba1e66eac30fcacacec55083a2bdf4fa1 Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Sun, 17 Jul 2011 10:36:31 -0500 Subject: Bring cop label testing in line with intentions. 8375c93eec supplied tests for a newly exported API but the type declarations for the arguments and return values didn't match the types of the API being tested. aebc0cbee0 renamed the functions without updating the calls to those functions in the test. Either of these could have been easily spotted by building with g++ (or other readily available tools) before pushing. This aside from the controversy over whether this particular API is the one that should be publicly exported, so this all may be reverted and replaced before 5.16.0, but hopefully it will unbreak the build for now. --- ext/XS-APItest/APItest.xs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index f1766c795e..232a309a97 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -2400,21 +2400,22 @@ void test_coplabel() PREINIT: COP *cop; - char *label; - int len, utf8; + const char *label; + STRLEN len; + U32 utf8; CODE: cop = &PL_compiling; - Perl_store_cop_label(aTHX_ cop, "foo", 3, 0); - label = Perl_fetch_cop_label(aTHX_ cop, &len, &utf8); - if (strcmp(label,"foo")) croak("fail # fetch_cop_label label"); - if (len != 3) croak("fail # fetch_cop_label len"); - if (utf8) croak("fail # fetch_cop_label utf8"); + Perl_cop_store_label(aTHX_ cop, "foo", 3, 0); + label = Perl_cop_fetch_label(aTHX_ cop, &len, &utf8); + if (strcmp(label,"foo")) croak("fail # cop_fetch_label label"); + if (len != 3) croak("fail # cop_fetch_label len"); + if (utf8) croak("fail # cop_fetch_label utf8"); /* SMALL GERMAN UMLAUT A */ - Perl_store_cop_label(aTHX_ cop, "foä", 4, SVf_UTF8); - label = Perl_fetch_cop_label(aTHX_ cop, &len, &utf8); - if (strcmp(label,"foä")) croak("fail # fetch_cop_label label"); - if (len != 3) croak("fail # fetch_cop_label len"); - if (!utf8) croak("fail # fetch_cop_label utf8"); + Perl_cop_store_label(aTHX_ cop, "foä", 4, SVf_UTF8); + label = Perl_cop_fetch_label(aTHX_ cop, &len, &utf8); + if (strcmp(label,"foä")) croak("fail # cop_fetch_label label"); + if (len != 3) croak("fail # cop_fetch_label len"); + if (!utf8) croak("fail # cop_fetch_label utf8"); HV * -- cgit v1.2.1