Issue #633 has been updated by Takehiro Kubo.


Here is a patch to fix the problem at line 78 of ext/dl/test/test_dl2.rb.

--- test_dl2.rb	(revision 21104)
+++ test_dl2.rb	(working copy)
@@ -75,7 +75,7 @@
     buff = "foobarbaz"
     cb = set_callback(TYPE_INT,2){|x,y| CPtr.new(x)[0] <=> CPtr.new(y)[0]}
     cfunc = CFunc.new(@libc['qsort'], TYPE_VOID, 'qsort')
-    cfunc.call([buff, buff.size, 1, cb].pack("pI!I!L!").unpack("l!*"))
+    cfunc.call([buff, buff.size, 1, cb].pack("pL!L!L!").unpack("l!*"))
     assert_equal('aabbfoorz', buff)
   end
 

The type of qsort's second and third arguments is size_t.

Note that this fixes only one problem. The test fails as before.

----------------------------------------
http://redmine.ruby-lang.org/issues/show/633

----------------------------------------
http://redmine.ruby-lang.org