summaryrefslogtreecommitdiff
path: root/src/perl/LogImport/typemap
diff options
context:
space:
mode:
Diffstat (limited to 'src/perl/LogImport/typemap')
-rw-r--r--src/perl/LogImport/typemap24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/perl/LogImport/typemap b/src/perl/LogImport/typemap
new file mode 100644
index 0000000..162308b
--- /dev/null
+++ b/src/perl/LogImport/typemap
@@ -0,0 +1,24 @@
+######################################################################
+# INPUT/OUTPUT maps
+# O_OBJECT -> links an opaque C object to a blessed Perl object.
+#
+TYPEMAP
+pmUnits T_INT_EQUIV
+pmID T_INT_EQUIV
+pmInDom T_INT_EQUIV
+
+######################################################################
+INPUT
+# struct or typedef that is really the same size as a 32-bit integer
+T_INT_EQUIV
+ {
+ __int32_t tmp = SvIV($arg);
+ memcpy((void *)&$var, (void *)&tmp, sizeof(__int32_t));
+ }
+
+######################################################################
+OUTPUT
+# struct or typedef that is really the same size as a 32-bit integer
+T_INT_EQUIV
+ sv_setiv($arg, *((int *)&$var));
+######################################################################