File: typemap

package info (click to toggle)
libtie-hash-indexed-perl 0.05%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 168 kB
  • sloc: perl: 10; makefile: 10
file content (33 lines) | stat: -rw-r--r-- 884 bytes parent folder | download
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
################################################################################
#
# $Project: /Tie-Hash-Indexed $
# $Author: mhx $
# $Date: 2006/01/21 12:06:58 +0100 $
# $Revision: 3 $
# $Source: /typemap $
#
################################################################################
# 
# Copyright (c) 2002-2003 Marcus Holland-Moritz. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
# 
################################################################################

TYPEMAP
IXHV *	T_OBJECT

OUTPUT
T_OBJECT
	sv_setref_pv($arg, CLASS, (void*)$var);

INPUT
T_OBJECT
	if (sv_isobject($arg) && SvTYPE(SvRV($arg)) == SVt_PVMG)
	{
	  IV tmp = SvIV((SV*)SvRV($arg));
	  $var = INT2PTR($type, tmp);
	}
	else
	  Perl_croak(aTHX_ \"${Package}::$func_name(): $var is not a blessed SV reference\");