mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_T
for size_t variables. [ruby-dev:45733] [Bug #6584] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a9ff01cdae
commit
bff44ef4cd
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jun 13 22:44:32 2012 Naohisa Goto <ngotogenome@gmail.com>
|
||||
|
||||
* test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_T
|
||||
for size_t variables. [ruby-dev:45733] [Bug #6584]
|
||||
|
||||
Wed Jun 13 22:18:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in: remove -ansi and -std options for lgamma_r() and
|
||||
|
|
|
@ -91,7 +91,7 @@ module DL
|
|||
cb = Function.new(CFunc.new(0, TYPE_INT, '<callback>qsort'),
|
||||
[TYPE_VOIDP, TYPE_VOIDP]){|x,y| CPtr.new(x)[0] <=> CPtr.new(y)[0]}
|
||||
qsort = Function.new(CFunc.new(@libc['qsort'], TYPE_VOID, 'qsort'),
|
||||
[TYPE_VOIDP, TYPE_INT, TYPE_INT, TYPE_VOIDP])
|
||||
[TYPE_VOIDP, TYPE_SIZE_T, TYPE_SIZE_T, TYPE_VOIDP])
|
||||
buff = "9341"
|
||||
qsort.call(buff, buff.size, 1, cb)
|
||||
assert_equal("1349", buff)
|
||||
|
@ -106,7 +106,7 @@ module DL
|
|||
cb = TempFunction.new(CFunc.new(0, TYPE_INT, '<callback>qsort'),
|
||||
[TYPE_VOIDP, TYPE_VOIDP])
|
||||
qsort = Function.new(CFunc.new(@libc['qsort'], TYPE_VOID, 'qsort'),
|
||||
[TYPE_VOIDP, TYPE_INT, TYPE_INT, TYPE_VOIDP])
|
||||
[TYPE_VOIDP, TYPE_SIZE_T, TYPE_SIZE_T, TYPE_VOIDP])
|
||||
buff = "9341"
|
||||
qsort.call(buff, buff.size, 1, cb){|x,y| CPtr.new(x)[0] <=> CPtr.new(y)[0]}
|
||||
assert_equal("1349", buff)
|
||||
|
|
Loading…
Reference in a new issue