| Issue 26: | CFFI functions missing | |
| 1 person starred this issue and may be notified of changes. | Back to list |
> What is the replacement for "val_iter_field" or how could I get all > field of an anonymous object? > "val_id" gives the integer has for a fieldname. Using the neko CFFI you > could use "val_field_name" to do the reverse? Is this also possible for > the cpp FFI?
Sep 5, 2010
Project Member
#1
gameh...@gmail.com
Dec 22, 2010
Hi, I'm doing some testing with haXe<->cpp bridge to our own 2d sdk, and I'm having trouble getting the parameter value when it is an enum (in haXe side). val_type(v) will return VAL_ABSTRACT, but trying to do a val_kind(v) says the value doesn't have a kind and if I do val_data(v) I get 0 (NULL). Also, couldn't find anything about this in C Foreign Function Interface doc (from haXe and NekoVM). Thanks
Jan 10, 2011
For enums, you can use val_is_object(obj), which should return true. I don't think there is a neko API to get the values out. You can use the "index" method to get an in, and pass in the args array - but you would have to do this from the haxe side.
Status:
Fixed
|