summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-11-27 07:13:15 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-11-27 07:14:01 -0800
commite6d4bf4347b8c0153b4a3a24ad9a3dd109cd0583 (patch)
treeaae8e23dc0b683cf272f492ba183e8c4d54e0175 /ext
parent86d1dcd79d0778ebfa3c5561b4e1d0988a942008 (diff)
downloadperl-e6d4bf4347b8c0153b4a3a24ad9a3dd109cd0583.tar.gz
Revert "Squash COWs in the char* typemap"
This reverts commit 77ca9de6373481d905eed6af2904599353a658b3.
Diffstat (limited to 'ext')
-rw-r--r--ext/XS-Typemap/Typemap.pm2
-rw-r--r--ext/XS-Typemap/Typemap.xs22
-rw-r--r--ext/XS-Typemap/t/Typemap.t13
3 files changed, 2 insertions, 35 deletions
diff --git a/ext/XS-Typemap/Typemap.pm b/ext/XS-Typemap/Typemap.pm
index d78134f7cf..583726a528 100644
--- a/ext/XS-Typemap/Typemap.pm
+++ b/ext/XS-Typemap/Typemap.pm
@@ -66,7 +66,7 @@ $VERSION = '0.12';
T_FLOAT
T_NV
T_DOUBLE
- T_PV T_PV_null T_PV_mutate T_ROPV
+ T_PV T_PV_null
T_PTR_IN T_PTR_OUT
T_PTRREF_IN T_PTRREF_OUT
T_REF_IV_REF
diff --git a/ext/XS-Typemap/Typemap.xs b/ext/XS-Typemap/Typemap.xs
index 8892ea697b..0eb68e54ee 100644
--- a/ext/XS-Typemap/Typemap.xs
+++ b/ext/XS-Typemap/Typemap.xs
@@ -579,28 +579,6 @@ T_PV_null()
OUTPUT:
RETVAL
-void
-T_PV_mutate( in, repl, len )
- char * in
- char * repl
- STRLEN len
- PREINIT:
- STRLEN i = 0;
- CODE:
- for (; i < len; i++)
- in[i] = repl[i];
-
-
-## T_ROPV
-
-const char *
-T_ROPV( in )
- const char * in
- CODE:
- RETVAL = in;
- OUTPUT:
- RETVAL
-
## T_PTR
diff --git a/ext/XS-Typemap/t/Typemap.t b/ext/XS-Typemap/t/Typemap.t
index 0a3994d10d..e251c55e7f 100644
--- a/ext/XS-Typemap/t/Typemap.t
+++ b/ext/XS-Typemap/t/Typemap.t
@@ -6,7 +6,7 @@ BEGIN {
}
}
-use Test::More tests => 152;
+use Test::More tests => 148;
use strict;
use warnings;
@@ -218,17 +218,6 @@ ok !defined T_PV_null, 'RETVAL = NULL returns undef for char*';
() = ''.T_PV_null;
is $uninit, 1, 'uninit warning from NULL returned from char* func';
}
-for my $cow (keys %{{foo=>1}}) {
- my $cow2 = $cow;
- T_PV_mutate($cow, "bar", 2);
- is( $cow, "bao", "mutating cows via char* param" );
- is( $cow2, "foo", "kin kine are unaffected" );
-}
-
-# T_ROPV
-note("T_ROPV");
-is( T_ROPV("a string"), "a string");
-is( T_ROPV(52), 52);
# T_PTR
my $t = 5;