mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
4bada8b864
* test/fiddle/*: testing fiddle extension * ext/dl/lib/dl.rb: Requiring fiddle if it is available * ext/dl/lib/dl/callback.rb: using Fiddle if it is available * ext/dl/lib/dl/func.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
30 lines
977 B
C
30 lines
977 B
C
#include <fiddle.h>
|
|
|
|
VALUE mFiddle;
|
|
|
|
void Init_fiddle()
|
|
{
|
|
mFiddle = rb_define_module("Fiddle");
|
|
|
|
rb_define_const(mFiddle, "TYPE_VOID", INT2NUM(TYPE_VOID));
|
|
rb_define_const(mFiddle, "TYPE_VOIDP", INT2NUM(TYPE_VOIDP));
|
|
rb_define_const(mFiddle, "TYPE_CHAR", INT2NUM(TYPE_CHAR));
|
|
rb_define_const(mFiddle, "TYPE_SHORT", INT2NUM(TYPE_SHORT));
|
|
rb_define_const(mFiddle, "TYPE_INT", INT2NUM(TYPE_INT));
|
|
rb_define_const(mFiddle, "TYPE_LONG", INT2NUM(TYPE_LONG));
|
|
#if HAVE_LONG_LONG
|
|
rb_define_const(mFiddle, "TYPE_LONG_LONG", INT2NUM(TYPE_LONG_LONG));
|
|
#endif
|
|
rb_define_const(mFiddle, "TYPE_FLOAT", INT2NUM(TYPE_FLOAT));
|
|
rb_define_const(mFiddle, "TYPE_DOUBLE", INT2NUM(TYPE_DOUBLE));
|
|
|
|
#if defined(HAVE_WINDOWS_H)
|
|
rb_define_const(mFiddle, "WINDOWS", Qtrue);
|
|
#else
|
|
rb_define_const(mFiddle, "WINDOWS", Qfalse);
|
|
#endif
|
|
|
|
Init_fiddle_function();
|
|
Init_fiddle_closure();
|
|
}
|
|
/* vim: set noet sws=4 sw=4: */
|