summaryrefslogtreecommitdiffstats
path: root/perl/typemap
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2008-04-14 21:52:55 -0400
committerBrian Cully <github.20.shmit@spamgourmet.com>2008-04-14 21:52:55 -0400
commit6ba98a9f9f48e13738d9736cba9c45b5e94f42f2 (patch)
tree86d7c281bcdbf67eb53cee064aa905e740ec5ccf /perl/typemap
downloadnastd-6ba98a9f9f48e13738d9736cba9c45b5e94f42f2.tar.gz
nastd-6ba98a9f9f48e13738d9736cba9c45b5e94f42f2.zip
Initial import
Diffstat (limited to 'perl/typemap')
-rw-r--r--perl/typemap23
1 files changed, 23 insertions, 0 deletions
diff --git a/perl/typemap b/perl/typemap
new file mode 100644
index 0000000..c22830d
--- /dev/null
+++ b/perl/typemap
@@ -0,0 +1,23 @@
+const char * T_PV
+nasth * T_PTROBJ
+NASTD::Hole O_NASTH
+
+#
+# Output methods
+#
+OUTPUT
+O_NASTH
+ sv_setref_pv($arg, "Asshole", (void *)$var);
+
+#
+# Input methods
+#
+INPUT
+O_NASTH
+ if (sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG)) {
+ $var = ($type)SvIV((SV *)SvRV($arg));
+ } else {
+ warn(\"${Package}::$func_name() --\"
+ \" $var is not a valid nasthole.\");
+ XSRETURN_UNDEF;
+ }