Lib.haxeToNeko . The reason
for this does not have to do with the differences between Neko and C/C++, but between Neko and
haXe. In Neko, each value type used in a Neko script can be safely and directly used by C/C++, albeit
sometimes with the help of a C function. However, some of the types native to haXe do not map directly
to Neko types as they extend from a class. This means that some types in haXe actually contain a hidden
member variable within them that represent the Neko data value. The class you would normally use
Table 20 - 1
Function Description
val_int( value v ) Returns the integer value stored in the value struct
val_float( value v ) Returns the float value stored in the value struct
val_bool( value v ) Returns the Boolean value stored in the value struct
val_string( value v ) Returns the string value stored in the value struct
val_strlen( value v ) Returns the length of the string value stored in the value struct
val_array_ptr( value v ) Returns the array stored in the value struct as a pointer of type
value
val_array_size( value v ) Returns the size of the array stored in the value struct
val_fun_nargs( value v ) Returns the number of arguments required by the function stored
in the value struct
val_data( value v ) Returns the abstract value stored in the value struct
val_kind( value v ) Returns the abstract constant identifier stored in the value struct
Part III: Extending the Possibilities
560
within haXe to represent the values type is merely an object providing extended functionality for use in
your haXe scripts.
Pages:
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038