summaryrefslogtreecommitdiff
path: root/ext/dl/test/test.rb
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-09 17:47:34 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-09 17:47:34 +0000
commit2d5b7f736518fb343469cd2bee721120309d8dca (patch)
tree2b087bbd1f6160b6c4b4fb787bc32f96fb889873 /ext/dl/test/test.rb
parentd5ceb6ef829a4913e045015ea0deb2269eef9093 (diff)
* ext/dl: change the callback mechanism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/test/test.rb')
-rw-r--r--ext/dl/test/test.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/dl/test/test.rb b/ext/dl/test/test.rb
index 316201a0b3..3e124783fa 100644
--- a/ext/dl/test/test.rb
+++ b/ext/dl/test/test.rb
@@ -38,8 +38,6 @@ print("MINOR_VERSION = #{DL::MINOR_VERSION}\n")
print("\n")
print("DLSTACK = #{DL::DLSTACK}\n")
print("MAX_ARG = #{DL::MAX_ARG}\n")
-print("MAX_CBARG = #{DL::MAX_CBARG}\n")
-print("MAX_CBENT = #{DL::MAX_CBENT}\n")
print("\n")
print("DL::FREE = #{DL::FREE.inspect}\n")
print("\n")
@@ -205,8 +203,7 @@ debug r,rs
assert("callback1", :must, r == 1)
-callback2 = DL.set_callback("LLP", 0){|arg1,arg2|
- ptr = arg2 # DL::PtrData.new(arg2)
+callback2 = DL.callback("LLP"){|num,ptr|
msg = ptr.to_s
if( msg == "callback message" )
2
@@ -218,7 +215,7 @@ debug callback2
r,rs = h["test_call_func1", "IP"][callback2]
debug r,rs
assert("callback2", :must, r == 2)
-
+DL.remove_callback(callback2)
ptr = DL.malloc(DL.sizeof('CL'))
ptr.struct!("CL", :c, :l)