| 36 | #define STRUCT_FIELDS(obj) rb_const_get(CLASS_OF(obj), fields_const_id) |
| 37 | |
| 38 | static VALUE new_container_array(int size) { |
| 39 | if (size < 0) { |
| 40 | rb_exc_raise( |
| 41 | get_protocol_exception( |
| 42 | INT2FIX(PROTOERR_NEGATIVE_SIZE), |
| 43 | rb_str_new2("Negative container size") |
| 44 | ) |
| 45 | ); |
| 46 | } |
| 47 | |
| 48 | return rb_ary_new2(size > 1024 ? 1024 : size); |
| 49 | } |
| 50 | |
| 51 | //------------------------------------------- |
| 52 | // Writing section |
no test coverage detected