| 1 |
# $Id: typemap,v 1.3 2002/08/26 02:40:25 moseley Exp $ |
| 2 |
|
| 3 |
TYPEMAP |
| 4 |
Hunspell * O_OBJECT |
| 5 |
|
| 6 |
# From: "perlobject.map" Dean Roehrich, version 19960302 |
| 7 |
# O_OBJECT -> link an opaque C or C++ object to a blessed Perl object. |
| 8 |
|
| 9 |
OUTPUT |
| 10 |
# The Perl object is blessed into 'CLASS', which should be a |
| 11 |
# char* having the name of the package for the blessing. |
| 12 |
O_OBJECT |
| 13 |
sv_setref_pv( $arg, CLASS, (void*)$var ); |
| 14 |
|
| 15 |
INPUT |
| 16 |
O_OBJECT |
| 17 |
if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) |
| 18 |
$var = ($type)SvIV((SV*)SvRV( $arg )); |
| 19 |
else{ |
| 20 |
warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" ); |
| 21 |
XSRETURN_UNDEF; |
| 22 |
} |