Discussion:
Typemap for "long long int"?
(too old to reply)
Bill Moseley
2012-07-22 01:12:09 UTC
Permalink
I'm stuck trying to link with a C++ library where some of the signatures
are "long long int".

note: candidate is: int SomeClass::Foo(char*, long long int, char*, int,
long long int, bool, bool)
perl -V shows this, if of any concern:

use64bitint=define, use64bitall=define

Could someone please show me how to correctly handle this signature?

Thanks,
--
Bill Moseley
***@hank.org
Marvin Humphrey
2012-07-22 12:57:27 UTC
Permalink
Post by Bill Moseley
use64bitint=define, use64bitall=define
Could someone please show me how to correctly handle this signature?
I believe that a "typemap" file in your build directory with the content below
my sig should do the trick.

Note that the <tab> character between "long long int" and "LONG_LONG_INT" is
mandatory.

More info here:

http://perldoc.perl.org/perlxstypemap.html

Marvin Humphrey


TYPEMAP

long long int LONG_LONG_INT

INPUT

LONG_LONG_INT
$var = ($type)SvIV($arg);

OUTPUT

LONG_LONG_INT
sv_setiv($arg, (IV)$var);

Loading...