Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Typemap for "long long int"?

9 views
Skip to first unread message

Bill Moseley

unread,
Jul 21, 2012, 9:12:09 PM7/21/12
to per...@perl.org
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
mos...@hank.org

Marvin Humphrey

unread,
Jul 22, 2012, 8:57:27 AM7/22/12
to Bill Moseley, per...@perl.org
On Sat, Jul 21, 2012 at 6:12 PM, Bill Moseley <mos...@hank.org> wrote:

> perl -V shows this, if of any concern:
>
> 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);
0 new messages