mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-15 19:35:36 +02:00
Use ruby.h RFLOAT_VALUE
This commit is contained in:
parent
dab4619a65
commit
70b89ba188
1 changed files with 1 additions and 3 deletions
|
@ -116,8 +116,6 @@ raiseRbExc(const Exception &exc);
|
||||||
#define RB_FIXNUM_P(obj) FIXNUM_P(obj)
|
#define RB_FIXNUM_P(obj) FIXNUM_P(obj)
|
||||||
#define RB_SYMBOL_P(obj) SYMBOL_P(obj)
|
#define RB_SYMBOL_P(obj) SYMBOL_P(obj)
|
||||||
|
|
||||||
#define RFLOAT_VALUE(obj) RFLOAT(obj)->value
|
|
||||||
|
|
||||||
#define RB_TYPE_P(obj, type) ( \
|
#define RB_TYPE_P(obj, type) ( \
|
||||||
((type) == RUBY_T_FIXNUM) ? RB_FIXNUM_P(obj) : \
|
((type) == RUBY_T_FIXNUM) ? RB_FIXNUM_P(obj) : \
|
||||||
((type) == RUBY_T_TRUE) ? ((obj) == RUBY_Qtrue) : \
|
((type) == RUBY_T_TRUE) ? ((obj) == RUBY_Qtrue) : \
|
||||||
|
@ -132,7 +130,7 @@ raiseRbExc(const Exception &exc);
|
||||||
#define DEF_ALLOCFUNC_CUSTOMFREE(type,free) \
|
#define DEF_ALLOCFUNC_CUSTOMFREE(type,free) \
|
||||||
static VALUE type##Allocate(VALUE klass)\
|
static VALUE type##Allocate(VALUE klass)\
|
||||||
{ \
|
{ \
|
||||||
void *sval; \
|
void *sval = 0; \
|
||||||
return Data_Wrap_Struct(klass, 0, free, sval); \
|
return Data_Wrap_Struct(klass, 0, free, sval); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue