Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
array.h
Go to the documentation of this file.
1 /*
2 ** mruby/array.h - Array class
3 **
4 ** See Copyright Notice in mruby.h
5 */
6 
7 #ifndef MRUBY_ARRAY_H
8 #define MRUBY_ARRAY_H
9 
10 #if defined(__cplusplus)
11 extern "C" {
12 #endif
13 
14 typedef struct mrb_shared_array {
15  int refcnt;
19 
20 struct RArray {
23  union {
26  } aux;
28 };
29 
30 #define mrb_ary_ptr(v) ((struct RArray*)(mrb_ptr(v)))
31 #define mrb_ary_value(p) mrb_obj_value((void*)(p))
32 #define RARRAY(v) ((struct RArray*)(mrb_ptr(v)))
33 
34 #define RARRAY_LEN(a) (RARRAY(a)->len)
35 #define RARRAY_PTR(a) (RARRAY(a)->ptr)
36 #define MRB_ARY_SHARED 256
37 
48 void mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val);
58 
59 #if defined(__cplusplus)
60 } /* extern "C" { */
61 #endif
62 
63 #endif /* MRUBY_ARRAY_H */