* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof):
CPtr -> Pointer. * test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof): Added the test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
914611adbc
commit
3fed8bc9a5
@ -1,3 +1,10 @@
|
|||||||
|
Fri Dec 21 22:43:36 2012 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
|
* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof):
|
||||||
|
CPtr -> Pointer.
|
||||||
|
* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
|
||||||
|
Added the test for the above.
|
||||||
|
|
||||||
Fri Dec 21 22:34:17 2012 Koichi Sasada <ko1@atdot.net>
|
Fri Dec 21 22:34:17 2012 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* test/ruby/test_iseq.rb: disable a test which checks features
|
* test/ruby/test_iseq.rb: disable a test which checks features
|
||||||
|
@ -127,7 +127,7 @@ module Fiddle
|
|||||||
return ty.size()
|
return ty.size()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return CPtr[ty].size()
|
return Pointer[ty].size()
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_bind_options(opts)
|
def parse_bind_options(opts)
|
||||||
|
@ -59,6 +59,7 @@ module Fiddle
|
|||||||
def test_sizeof()
|
def test_sizeof()
|
||||||
assert_equal(SIZEOF_VOIDP, LIBC.sizeof("FILE*"))
|
assert_equal(SIZEOF_VOIDP, LIBC.sizeof("FILE*"))
|
||||||
assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct))
|
assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct))
|
||||||
|
assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct.malloc()))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_unsigned_result()
|
def test_unsigned_result()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user