llancet has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to write a perl wrapper for my C++ library. My whole library is under a namespace:
I wrote the following typemap, in which T_IV is a perl build-in typemap:namespace geno_eye { typedef int64_t PosType; }
and I wrote the following XS code:TYPEMAP geno_eye::PosType T_IV
It seems xsubpp converts ":" into "_":.... MODULE = GenoEye PACKAGE = GenoEye::Page geno_eye::Page* Page::new(format, file, width, height, genome_display_length) SV* format SV* file double width double height geno_eye::PosType genome_display_length CODE:
How to work around it?GenoEye.c:196:2: error: ‘geno_eye__PosType’ was not declared in this s +cope geno_eye__PosType genome_display_length = (geno_eye__PosType)SvIV(ST +(5))
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: XS cannot properly handle typemap with namespace (use XSpp)
by Anonymous Monk on Jan 03, 2014 at 04:49 UTC | |
by llancet (Friar) on Jan 03, 2014 at 05:58 UTC | |
by Anonymous Monk on Jan 03, 2014 at 09:16 UTC | |
by llancet (Friar) on Jan 06, 2014 at 13:56 UTC |
Back to
Seekers of Perl Wisdom