File: typemap

package info (click to toggle)
libencode-detect-perl 1.01-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 748 kB
  • ctags: 503
  • sloc: cpp: 4,032; perl: 27; ansic: 21; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
TYPEMAP
Detector *	O_OBJECT

INPUT
O_OBJECT
	if (sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG)) {
	    $var = ($type)SvIV((SV*)SvRV( $arg ));
	} else {
	    warn(\"${Package}::$func_name() -- $var is not a blessed SV reference\");
	    XSRETURN_UNDEF;
	}

OUTPUT
# The Perl object is blessed into 'CLASS', which should be a
# char * having the name of the package for the blessing.
O_OBJECT
	sv_setref_pv($arg, CLASS, (void*)$var);