diff options
author | Takashi Tamura <tamuratak@users.noreply.github.com> | 2017-03-06 15:13:05 +0900 |
---|---|---|
committer | Takashi Tamura <tamuratak@users.noreply.github.com> | 2017-03-06 15:13:05 +0900 |
commit | d0af6fd97d981b548ac37782763f0913eb8aaac8 (patch) | |
tree | 7e7759a346ad681e5f7ab75fef44222bf6878c4a /Lib/ruby/rubyrun.swg | |
parent | b451fc464b07af591b09d999aba0f5b897fbf99f (diff) | |
download | swig-d0af6fd97d981b548ac37782763f0913eb8aaac8.tar.gz |
[ruby] must not do null check for VALUE obj, which can be 0x0 == Qfalse, a valid Ruby object.
Diffstat (limited to 'Lib/ruby/rubyrun.swg')
-rw-r--r-- | Lib/ruby/rubyrun.swg | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ruby/rubyrun.swg b/Lib/ruby/rubyrun.swg index 249494ab0..94618db4e 100644 --- a/Lib/ruby/rubyrun.swg +++ b/Lib/ruby/rubyrun.swg @@ -246,7 +246,7 @@ typedef struct { SWIGRUNTIME swig_ruby_owntype SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) { swig_ruby_owntype oldown = {0, 0}; - if (obj) { + if (TYPE(obj) == T_DATA) { oldown.datafree = RDATA(obj)->dfree; RDATA(obj)->dfree = own.datafree; } |