1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/fiddle/fiddle.c
tenderlove 20e2c4cb36 * Use _WIN32 rather than checking for windows.h. Thanks Jon Forums!
[ruby-core:33977]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 03:13:18 +00:00

30 lines
969 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(_WIN32)
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: */