mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/dl/dl.c (Init_dl): support intrinsic types, size_t, ptrdiff_t
and intptr_t. [ruby-core:42460][Feature #5992] * ext/fiddle/fiddle.c (Init_fiddle): ditto. * ext/dl/lib/dl/cparser.rb (DL::CParser#parse_ctype): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d9adb03dd9
commit
b4288080e7
11 changed files with 270 additions and 11 deletions
|
@ -9,5 +9,25 @@ module DL
|
|||
def test_uint_ctype
|
||||
assert_equal(-DL::TYPE_INT, parse_ctype('uint'))
|
||||
end
|
||||
|
||||
def test_size_t_ctype
|
||||
assert_equal(DL::TYPE_SIZE_T, parse_ctype("size_t"))
|
||||
end
|
||||
|
||||
def test_ssize_t_ctype
|
||||
assert_equal(DL::TYPE_SSIZE_T, parse_ctype("ssize_t"))
|
||||
end
|
||||
|
||||
def test_ptrdiff_t_ctype
|
||||
assert_equal(DL::TYPE_PTRDIFF_T, parse_ctype("ptrdiff_t"))
|
||||
end
|
||||
|
||||
def test_intptr_t_ctype
|
||||
assert_equal(DL::TYPE_INTPTR_T, parse_ctype("intptr_t"))
|
||||
end
|
||||
|
||||
def test_uintptr_t_ctype
|
||||
assert_equal(DL::TYPE_UINTPTR_T, parse_ctype("uintptr_t"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue