Merge: add NativeArray::length
authorJean Privat <jean@pryen.org>
Fri, 18 Apr 2014 17:36:53 +0000 (13:36 -0400)
committerJean Privat <jean@pryen.org>
Fri, 18 Apr 2014 17:37:05 +0000 (13:37 -0400)
commit27fc6aff38ecf76e5e02690e39d46b817c2a504d
treebea976ee47e125730c1edbda68dce283ca19f14c
parent9dc59d0711a4360d18c4d96beea380df6ad7914b
parent1968da09bcd4f2e86b0ddbf396c4686e4f900d4a
Merge: add NativeArray::length

Add and implement native methods `NativeArray::length` and `NativeArray::to_a`

The length could be available but was not for historial reasons.
`to_a` is trivial once `length` is defined.

A future series will add `NativeArray::new` and depreciate the ugly `calloc_array`.

Note: because of a bug in nitg, the compiler in `c_src` seems to return 0 on `length` instead of aborting.

Pull-Request: #405
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>