diff options
| author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-09 17:47:34 +0000 |
|---|---|---|
| committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-09 17:47:34 +0000 |
| commit | 6ff6e8758d4125174a19b49029dc9499f0c6b8dc (patch) | |
| tree | 2b087bbd1f6160b6c4b4fb787bc32f96fb889873 /ext/dl/test | |
| parent | 717dfa48d53a58f9574755de3d4b997e4dd6c828 (diff) | |
* ext/dl: change the callback mechanism.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/test')
| -rw-r--r-- | ext/dl/test/test.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/dl/test/test.rb b/ext/dl/test/test.rb index 316201a0b..3e124783f 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) |
