mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fabba1b93b
commit
230ca5ffe5
3 changed files with 20 additions and 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>
|
Wed Jun 2 11:40:02 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* compile.c (iseq_compile_each): should consider block on stack,
|
* compile.c (iseq_compile_each): should consider block on stack,
|
||||||
|
|
|
@ -73,7 +73,7 @@ module DL
|
||||||
return -TYPE_SHORT
|
return -TYPE_SHORT
|
||||||
when "int"
|
when "int"
|
||||||
return TYPE_INT
|
return TYPE_INT
|
||||||
when "unsigned int"
|
when "unsigned int", 'uint'
|
||||||
return -TYPE_INT
|
return -TYPE_INT
|
||||||
when "long"
|
when "long"
|
||||||
return TYPE_LONG
|
return TYPE_LONG
|
||||||
|
|
13
test/dl/test_cparser.rb
Normal file
13
test/dl/test_cparser.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue