File: typemap

package info (click to toggle)
libterm-slang-perl 0.07-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 108 kB
  • ctags: 38
  • sloc: perl: 614; makefile: 38
file content (43 lines) | stat: -rw-r--r-- 997 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
TYPEMAP

SLsmg_Term_Type	*	T_PTROBJ

Scroll_Line_Type	* O_OBJECT
SLscroll_Window_Type *	T_PTROBJ
# SLscroll_Type *		T_PTROBJ

SLang_Read_Line_Type  * T_PTROBJ
SLang_RLine_Info_Type * T_PTROBJ

int *			T_IV
unsigned short *	T_UV

######################################################################
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 );

T_OBJECT
	sv_setref_pv( $arg, Nullch, (void*)$var );

######################################################################
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;
	}

T_OBJECT
	if( SvROK($arg) )
		$var = ($type)SvIV((SV*)SvRV( $arg ));
	else{
		warn( \"${Package}::$func_name() -- $var is not an SV reference\" );
		XSRETURN_UNDEF;
	}