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
nobu 5f79c781e3 * ext/dl/{mkcall,mkcallback,mkcbtable}.rb: no needs of mkmf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-27 19:31:38 +00:00

17 lines
344 B
Ruby

# -*- ruby -*-
$:.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
}