diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ext/dl/lib/dl/cparser.rb | 2 | ||||
-rw-r--r-- | test/dl/test_cparser.rb | 13 |
3 files changed, 20 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Thu Jun 3 00:58:45 2010 Aaron Patterson <aaron@tenderlovemaking.com> + + * ext/dl/lib/dl/cparser.rb (parse_ctype): add backwards compatibility + by supporting "uint" types in the c parser. [ruby-core:29750] + * test/dl/test_cparser.rb: adding a test for "uint" changes. + Wed Jun 2 11:40:02 2010 Yukihiro Matsumoto <matz@ruby-lang.org> * compile.c (iseq_compile_each): should consider block on stack, diff --git a/ext/dl/lib/dl/cparser.rb b/ext/dl/lib/dl/cparser.rb index be23ab4567..210f953471 100644 --- a/ext/dl/lib/dl/cparser.rb +++ b/ext/dl/lib/dl/cparser.rb @@ -73,7 +73,7 @@ module DL return -TYPE_SHORT when "int" return TYPE_INT - when "unsigned int" + when "unsigned int", 'uint' return -TYPE_INT when "long" return TYPE_LONG diff --git a/test/dl/test_cparser.rb b/test/dl/test_cparser.rb new file mode 100644 index 0000000000..3be727a759 --- /dev/null +++ b/test/dl/test_cparser.rb @@ -0,0 +1,13 @@ +require_relative 'test_base' + +require 'dl/cparser' + +module DL + class TestCParser < TestBase + include DL::CParser + + def test_uint_ctype + assert_equal(-DL::TYPE_INT, parse_ctype('uint')) + end + end +end |