Skip to content

Commit 47a7760

Browse files
committed
Fold typemap into Fast.xs
1 parent a5c3ad5 commit 47a7760

File tree

4 files changed

+25
-31
lines changed

4 files changed

+25
-31
lines changed

Fast.xs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,20 @@ SvPV_stable_storage(pTHX_ SV *sv, STRLEN *lp)
653653
MODULE = Cache::Memcached::Fast PACKAGE = Cache::Memcached::Fast
654654

655655

656+
TYPEMAP: <<TYPEMAP
657+
Cache_Memcached_Fast * T_CACHE_MEMCACHED_FAST
658+
659+
INPUT
660+
T_CACHE_MEMCACHED_FAST
661+
$var = INT2PTR($type, SvIVX(SvRV($arg)));
662+
663+
OUTPUT
664+
T_CACHE_MEMCACHED_FAST
665+
sv_setref_pv($arg, class, (void *) $var);
666+
667+
TYPEMAP
668+
669+
656670
Cache_Memcached_Fast *
657671
_new(char *class, SV *conf)
658672
PROTOTYPE: $$

Makefile.PL

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,18 @@ my %args = (
2525
},
2626
},
2727
},
28+
BUILD_REQUIRES => {
29+
'ExtUtils::ParseXS' => '3.12'; # For embedded typemaps.
30+
},
2831
TEST_REQUIRES => {
2932
'Test2::Suite' => '0.000072', # For Test2::V0.
3033
},
3134
);
3235

36+
# Merge BUILD_REQUIRES into PREREQ_PM if EU::MM is too old to understand.
37+
$args{PREREQ_PM} = { %{ $args{PREREQ_PM} }, %{ delete $args{BUILD_REQUIRES} } }
38+
unless eval { ExtUtils::MakeMaker->VERSION('6.55_03') };
39+
3340
# Merge TEST_REQUIRES into PREREQ_PM if EU::MM is too old to understand.
3441
$args{PREREQ_PM} = { %{ $args{PREREQ_PM} }, %{ delete $args{TEST_REQUIRES} } }
3542
unless eval { ExtUtils::MakeMaker->VERSION('6.64') };

cpanfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ requires 'Carp' => '1.25'; # For trailing dot.
22
requires 'XSLoader' => '0.14'; # For XSLoader::load with no arguments.
33
requires 'perl' => 'v5.12';
44

5+
on build => sub {
6+
requires 'ExtUtils::ParseXS' => '3.12'; # For embedded typemaps.
7+
};
8+
59
on test => sub {
610
requires 'Test2::Suite' => '0.000072'; # For Test2::V0.
711
};

typemap

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)