From c592932cee7e43e8cb9f8827f79978f7846e4c41 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 9 Sep 2013 21:43:28 +0200 Subject: [PATCH] Use a general-purpose T_ARRAYREF_PTR typemap --- xs/xsp/my.map | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xs/xsp/my.map b/xs/xsp/my.map index 7b1cff8cf..e7735f7d9 100644 --- a/xs/xsp/my.map +++ b/xs/xsp/my.map @@ -23,7 +23,7 @@ Lines T_ARRAYREF Polygons T_ARRAYREF ExPolygons T_ARRAYREF -Polygons* T_ARRAYREF_POLYGONS_PTR +Polygons* T_ARRAYREF_PTR INPUT @@ -56,12 +56,12 @@ T_ARRAYREF } $var.clear(); -T_ARRAYREF_POLYGONS_PTR +T_ARRAYREF_PTR AV* av = newAV(); $arg = newRV_noinc((SV*)av); sv_2mortal($arg); av_extend(av, $var->size()-1); int i = 0; - for (Polygons::iterator it = $var->begin(); it != $var->end(); ++it) { + for (${ my $t = $type; $t =~ s/\*$//; \$t }::iterator it = $var->begin(); it != $var->end(); ++it) { av_store(av, i++, (*it).to_SV_ref()); }