Skip Menu |

This queue is for tickets about the ExtUtils-Typemaps-Default CPAN distribution.

Report information
The Basics
Id: 84693
Status: open
Priority: 0/
Queue: ExtUtils-Typemaps-Default

People
Owner: Nobody in particular
Requestors: jeroen.nijhof [...] ericsson.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: ExtUtils::Typemaps::STL::Vector could do with spaced out 'std::vector< std::string > * T_STD_VECTOR_STD_STRING_PTR
Date: Wed, 17 Apr 2013 09:41:06 +0000
To: "bug-ExtUtils-Typemaps-Default [...] rt.cpan.org" <bug-ExtUtils-Typemaps-Default [...] rt.cpan.org>
From: Jeroen Nijhof <jeroen.nijhof [...] ericsson.com>
Hello, I'm trying to set up a module with ExtUtiles::XSpp, with so far a static method that returns a const std::vector<std::string>& . Using Module::Build::WithXSpp with extra typemap module ExtUtils::Typemaps::STL that failed with: Could not find a typemap for C type 'std::vector< std::string > *'. I noticed that in ExtUtils::Typemaps::STL::Vector.pm there were mappings for e.g. 'std::vector< int >' as well as for 'std::vector<int>', so I solved my problem by adding local typemap entries: std::vector< std::string > T_STD_VECTOR_STD_STRING std::vector< std::string > * T_STD_VECTOR_STD_STRING_PTR std::vector< char* > T_STD_VECTOR_CSTRING std::vector< char* > * T_STD_VECTOR_CSTRING_PTR (with spaces). Maybe it would be useful to add those lines to Vector.pm? Best regards, Jeroen Nijhof
Hi, On Wed Apr 17 05:41:21 2013, jeroen.nijhof@ericsson.com wrote: Show quoted text
> (with spaces). Maybe it would be useful to add those lines to > Vector.pm?
this is indeed a valid bug. But I'd really rather fix it in the (lack of) type canonicalization happening in ExtUtils::ParseXS (or more specifically ExtUtils::Typemaps) than in this module. As you found, I did work around this issue back in the day by including more whitespace-modified type variants in the typemaps. Yuck. :) If you need this fixed ASAP, then I can do a fixed release of ExtUtils::Typemaps::STL::Vector, but I'll try and come up with a slightly less insufficient way to do canonicalization before I go there. Best regards, Steffen
I've since pushed ExtUtils::ParseXS 3.18_03 which should do the necessary canonicalization. Please test that (but be aware that it also has lots of other changes since the most recent stable release). Best regards, Steffen