summaryrefslogtreecommitdiff
path: root/Lib/ruby/rubyhead.swg
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-22 19:46:29 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-22 19:55:55 +0000
commita006091b0f7cff98abc650e0364c0814aa976e8f (patch)
tree6ef75e0c05480d5991ab2d729fd1882984ed069b /Lib/ruby/rubyhead.swg
parent72723d354a830c461131f91e35b90e1d85b74e00 (diff)
downloadswig-a006091b0f7cff98abc650e0364c0814aa976e8f.tar.gz
Add in a definition for RTYPEDDATA_P for Ruby<1.9.3
This definition ensures the SWIG wrappers keep compiling in older versions of Ruby given the previous change (which uses RTYPEDDATA_P and hence requires Ruby 1.9.3). The definition of RTYPEDDATA_P is such that the previous commit plus the definition should keep the behaviour the same as before.
Diffstat (limited to 'Lib/ruby/rubyhead.swg')
-rw-r--r--Lib/ruby/rubyhead.swg3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/ruby/rubyhead.swg b/Lib/ruby/rubyhead.swg
index 9960087c6..90f07cf68 100644
--- a/Lib/ruby/rubyhead.swg
+++ b/Lib/ruby/rubyhead.swg
@@ -91,6 +91,9 @@
#ifndef RSTRUCT_PTR
# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
#endif
+#ifndef RTYPEDDATA_P
+# define RTYPEDDATA_P(x) (TYPE(x) != T_DATA)
+#endif