split out RSTRUCT* compat macros
[raindrops.git] / ext / raindrops / rstruct_19.h
blobf1562060e583339287dd4456d2e4d18d7df64cd3
1 #ifdef RSTRUCT
2 # ifndef RSTRUCT_PTR
3 # define RSTRUCT_PTR(s) (RSTRUCT(s)->ptr)
4 # endif
5 # ifndef RSTRUCT_LEN
6 # define RSTRUCT_LEN(s) (RSTRUCT(s)->len)
7 # endif
8 #endif
11 #ifndef HAVE_RB_STRUCT_ALLOC_NOINIT
12 static ID id_new;
13 static VALUE rb_struct_alloc_noinit(VALUE class)
15 return rb_funcall(class, id_new, 0, 0);
17 #endif /* !defined(HAVE_RB_STRUCT_ALLOC_NOINIT) */