mirror of
https://github.com/janet-lang/janet
synced 2025-10-23 03:37:40 +00:00
Use :length method for (length abstract)
Also adds the janet_lengthv API call. This is needed because janet_length returns a 32 bit integer, where as lengthv lets us return larger values (useful for typed arrays). janet_mcall is an api function that should make it easier to call a janet method from C code. It shares a similar signature with janet_call.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
(assert (= (a 2) (b 1) ) "tarray views pointing same buffer")
|
||||
(assert (= ((tarray/slice b) 3) (b 3) (a 6) 6) "tarray slice")
|
||||
(assert (= ((tarray/slice b 1) 2) (b 3) (a 6) 6) "tarray slice")
|
||||
(assert (= (:length a) (length a)) "length method and function")
|
||||
|
||||
(assert (= ((unmarshal (marshal b)) 3) (b 3)) "marshal")
|
||||
|
||||
|
Reference in New Issue
Block a user