1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/dl/mkcbtable.rb
ttate 2d5b7f7365 * ext/dl: change the callback mechanism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-09 17:47:34 +00:00

18 lines
359 B
Ruby

# -*- ruby -*-
require 'mkmf'
$:.unshift File.dirname(__FILE__)
require 'type'
require 'dlconfig'
def mktable(rettype, fnum, argc)
code =
"rb_dl_callback_table[#{rettype}][#{fnum}] = &rb_dl_callback_func_#{rettype.to_s}_#{fnum};"
return code
end
DLTYPE.keys.sort.each{|t|
for n in 0..(MAX_CALLBACK - 1)
print(mktable(t, n, 15), "\n")
end
}