Method: Snow::Mat4Array#freeze
- Defined in:
- ext/snow-math/snow-math.c
#freeze ⇒ Object
Freezes the array and its elements.
call-seq: freeze -> self
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 |
# File 'ext/snow-math/snow-math.c', line 1348 static VALUE sm_mat4_array_freeze(VALUE sm_self) { VALUE sm_cache; VALUE sm_cached_entry; long length; long index; if (OBJ_FROZEN(sm_self)) { return sm_self; } sm_cache = rb_ivar_get(sm_self, kRB_IVAR_MATHARRAY_CACHE); length = RARRAY_LEN(sm_cache); for (index = 0; index < length; ++index) { sm_cached_entry = rb_ary_entry(sm_cache, index); if (RTEST(sm_cached_entry)) { rb_funcall2(sm_cached_entry, kRB_NAME_FREEZE, 0, 0); } } return rb_call_super(0, 0); } |