summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-03 09:53:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-03 09:53:30 +0000
commit544651a2fb9c748e240e30b6def86e9158fa28f1 (patch)
treec467bcefa1edf949a964cd2f5bac7a48bc697952
parent91bcb09262f08c9c3c31064cb2a5c159d8b5000d (diff)
cparser.rb: limit word number
* ext/fiddle/lib/fiddle/cparser.rb (parse_ctype): limit split word number as the rest are not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/fiddle/lib/fiddle/cparser.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index afba089..7ba7c96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jan 3 18:53:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/fiddle/lib/fiddle/cparser.rb (parse_ctype): limit split word
+ number as the rest are not used.
+
Sat Jan 3 18:19:50 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* ext/fiddle/lib/fiddle/cparser.rb: r49110 broke Fiddle::Import with
diff --git a/ext/fiddle/lib/fiddle/cparser.rb b/ext/fiddle/lib/fiddle/cparser.rb
index 39812e1..4be82a6 100644
--- a/ext/fiddle/lib/fiddle/cparser.rb
+++ b/ext/fiddle/lib/fiddle/cparser.rb
@@ -169,7 +169,7 @@ module Fiddle
when /\*/, /\[[\s\d]*\]/
return TYPE_VOIDP
else
- ty = ty.split(' ')[0]
+ ty = ty.split(' ', 2)[0]
if( tymap[ty] )
return parse_ctype(tymap[ty], tymap)
else