summaryrefslogtreecommitdiff
path: root/swig/Date.i
diff options
context:
space:
mode:
authorArvin Schnell <aschnell@suse.de>2007-07-23 10:33:14 +0000
committerArvin Schnell <aschnell@suse.de>2007-07-23 10:33:14 +0000
commitd690eb0f5ac56b3dd56a56bd53a656596cdf3cf3 (patch)
tree6fff6c0d9b0606745b6027dc9cc91cd54b03ae83 /swig/Date.i
parentd510c281c743491d95864239889a6c1fcec567bf (diff)
downloadlibzypp-bindings-d690eb0f5ac56b3dd56a56bd53a656596cdf3cf3.tar.gz
libzypp-bindings-d690eb0f5ac56b3dd56a56bd53a656596cdf3cf3.tar.bz2
libzypp-bindings-d690eb0f5ac56b3dd56a56bd53a656596cdf3cf3.zip
- define ruby typemaps only when generating ruby code
Diffstat (limited to 'swig/Date.i')
-rw-r--r--swig/Date.i4
1 files changed, 4 insertions, 0 deletions
diff --git a/swig/Date.i b/swig/Date.i
index 930abb5..12717de 100644
--- a/swig/Date.i
+++ b/swig/Date.i
@@ -1,4 +1,6 @@
+#ifdef SWIGRUBY
+
%typemap(in) Date {
Date::ValueType seconds = (Date::ValueType) NUM2INT( rb_funcall( $input, rb_intern("to_i"), 0, 0) );
$1 = Date(seconds);
@@ -11,3 +13,5 @@
$result = rb_funcall( klass, rb_intern("at"), 1, rbtimenum);
}
+#endif
+