35 # ifndef RUBY_METHOD_FUNC
36 # define VALUEFUNC(f) ((VALUE (*)()) f)
37 # define VOIDFUNC(f) ((void (*)()) f)
40 # define VALUEFUNC(f) ((VALUE (*)()) f)
41 # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
43 # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
44 # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
48 # define VALUEFUNC(f) (f)
49 # define VOIDFUNC(f) (f)
54 #define RRNEW(obj, type) obj = rb_class_new_instance (0, NULL, type)
56 #define RRGRAB(fromobj, type, toobj) \
58 Data_Get_Struct (rb_iv_get (fromobj, "__rr__"), type, toobj)
60 #define RRCALL(obj, type) \
62 Data_Get_Struct(rb_iv_get (obj, "__rr__"), type, v); ((type *)(v))
64 #define RRCALL2(obj, type, ptr) \
66 Data_Get_Struct(rb_iv_get (obj, "__rr__"), type, v); ptr = v
68 #define RRMODCALL(obj, modtype, convfunc) \
70 Data_Get_Struct (rb_iv_get (obj, "__rr__"), modtype, v); \
71 convfunc ((void**)&v, obj); v
73 #define RRMODCALL2(obj, modtype, convfunc, ptr) \
75 Data_Get_Struct (rb_iv_get (obj, "__rr__"), modtype, v); \
76 convfunc ((void**)&v, obj); ptr = v
79 #define RRSTRING(v) (TYPE(v) == T_STRING)
80 #define RRINT(v) (TYPE(v) == T_FIXNUM)
81 #define RRFLOAT(v) ((TYPE(v) == T_FLOAT) || (TYPE(v) == T_FIXNUM))
82 #define RRARRAY(v, kind) (TYPE(v) == T_ARRAY && kind(rb_ary_entry(v, 0)))
83 #define RRDATA(v) (TYPE(v) == T_OBJECT)
84 #define RRFUNC(v) (TYPE(v) == T_SYMBOL)
VALUE rr_arrayf_new(const TArrayF *a)
void rr_tattaxis_conv(void **ptr, VALUE klass)
void rr_tattpad_conv(void **ptr, VALUE klass)
struct drr_func_entry * drr_func_cache_find(struct drr_func_cache *cache, char *name)
void drr_func_cache_push(struct drr_func_cache *cache, struct drr_func_entry *entry)
struct drr_func_entry * entry
void rr_register_ctf1_fcn(char *name, ID id)
void rr_register_ctf2_fcn(char *name, ID id)
Array of floats (32 bits per element).
VALUE rr_arrayi_new(const TArrayI *a)
void rr_tattmarker_conv(void **ptr, VALUE klass)
Array of integers (32 bits per element).
VALUE rr_arrayl_new(const TArrayL *a)
VALUE rr_arrayd_new(const TArrayD *a)
Sequenceable collection abstract base class.
VALUE rr_arrays_new(const TArrayS *a)
VALUE rr_arrayc_new(const TArrayC *a)
void rr_tattfill_conv(void **ptr, VALUE klass)
Array of shorts (16 bits per element).
double rr_ctf1_fcn(double *, double *)
struct drr_func_cache * drr_func_cache_init(struct drr_func_entry *entry)
Array of longs (32 or 64 bits per element).
double rr_ctf2_fcn(double *, double *)
struct drr_func_cache * last
struct drr_func_cache * next
static VALUE drr_method_missing(int argc, VALUE argv[], VALUE self)
static VALUE drr_generic_method(int argc, VALUE argv[], VALUE self)
VALUE rr_ary_new(TList *l)
void rr_tatttext_conv(void **ptr, VALUE klass)
void drr_func_entry_free(struct drr_func_entry *entry)
Array of doubles (64 bits per element).
VALUE rr_seqcollection_new(TSeqCollection *sc)
void rr_tattline_conv(void **ptr, VALUE klass)
Array of chars or bytes (8 bits per element).