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