diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-03-04 11:51:08 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-03-04 11:51:08 +0000 |
commit | 7a646707d4c96d60a8c48febd5483da865fc777a (patch) | |
tree | 8cd007a31642ffa6fc612ad3754e186f69fb651e /ext/XS | |
parent | 4e7676c784119f034a642411bdc4cde7d6f0c54a (diff) | |
download | perl-7a646707d4c96d60a8c48febd5483da865fc777a.tar.gz |
Rename exception() to apitest_exception() in XS/APItest, so that it
doesn't clash with the exception() in Devel/PPPort. This way, all
tests pass when both modules are staticly linked.
p4raw-id: //depot/perl@30459
Diffstat (limited to 'ext/XS')
-rw-r--r-- | ext/XS/APItest/APItest.pm | 2 | ||||
-rw-r--r-- | ext/XS/APItest/APItest.xs | 4 | ||||
-rw-r--r-- | ext/XS/APItest/exception.c | 6 | ||||
-rw-r--r-- | ext/XS/APItest/t/exception.t | 4 |
4 files changed, 10 insertions, 6 deletions
diff --git a/ext/XS/APItest/APItest.pm b/ext/XS/APItest/APItest.pm index e230eb2694..17e6abb7b3 100644 --- a/ext/XS/APItest/APItest.pm +++ b/ext/XS/APItest/APItest.pm @@ -19,7 +19,7 @@ our @EXPORT = qw( print_double print_int print_long call_sv call_pv call_method eval_sv eval_pv require_pv G_SCALAR G_ARRAY G_VOID G_DISCARD G_EVAL G_NOARGS G_KEEPERR G_NODEBUG G_METHOD - exception mycroak strtab + apitest_exception mycroak strtab my_cxt_getint my_cxt_getsv my_cxt_setint my_cxt_setsv sv_setsv_cow_hashkey_core sv_setsv_cow_hashkey_notcore ); diff --git a/ext/XS/APItest/APItest.xs b/ext/XS/APItest/APItest.xs index 9d56365f5c..b01ae55f78 100644 --- a/ext/XS/APItest/APItest.xs +++ b/ext/XS/APItest/APItest.xs @@ -49,7 +49,7 @@ my_cxt_setsv_p(SV* sv _pMY_CXT) /* from exception.c */ -int exception(int); +int apitest_exception(int); /* from core_or_not.inc */ bool sv_setsv_cow_hashkey_core(void); @@ -507,7 +507,7 @@ require_pv(pv) require_pv(pv); int -exception(throw_e) +apitest_exception(throw_e) int throw_e OUTPUT: RETVAL diff --git a/ext/XS/APItest/exception.c b/ext/XS/APItest/exception.c index 9477ea95f8..01ff912a2a 100644 --- a/ext/XS/APItest/exception.c +++ b/ext/XS/APItest/exception.c @@ -10,7 +10,11 @@ static void throws_exception(int throw_e) croak("boo\n"); } -int exception(int throw_e) +/* Don't give this the same name as exection() in ext/Devel/PPPort/module3.c + as otherwise building entirely staticly will cause a test to fail, as + PPPort's execption() gets used in place of this one. */ + +int apitest_exception(int throw_e) { dTHR; dXCPT; diff --git a/ext/XS/APItest/t/exception.t b/ext/XS/APItest/t/exception.t index dc6d3246d6..2ac7132b63 100644 --- a/ext/XS/APItest/t/exception.t +++ b/ext/XS/APItest/t/exception.t @@ -19,7 +19,7 @@ my $rv; $XS::APItest::exception_caught = undef; -$rv = eval { exception(0) }; +$rv = eval { apitest_exception(0) }; is($@, ''); ok(defined $rv); is($rv, 42); @@ -27,7 +27,7 @@ is($XS::APItest::exception_caught, 0); $XS::APItest::exception_caught = undef; -$rv = eval { exception(1) }; +$rv = eval { apitest_exception(1) }; is($@, "boo\n"); ok(not defined $rv); is($XS::APItest::exception_caught, 1); |