Lib.haxeToNeko( ???Doody??? ) );
printAbstract( __a );
}
static var getAbstract = neko.Lib.load( ???hello???, ???GetAbstract???, 1 );
static var printAbstract = neko.Lib.load( ???hello???, ???PrintAbstract???, 1 );
}
When dereferencing an abstract value struct, you must remember that the function val_data returns
the content of the struct as type void * , so the C/C++ compiler doesn ??™ t really know what it ??™ s dealing
with. Therefore, you must cast the value referenced from the value struct before assigning it elsewhere.
Object Types
haXe objects function in C/C++ much like key/value tables. They allow grouping of multiple values,
including other objects and Neko functions, by name. This proves useful when passing numerous
values of varying type from a C/C++ library to a Neko script as part of the return value from an
executed C/C++ function. Each of the values within a Neko object can be of differing type and you
are not restricted to the number of values assigned to the object.
Passing Objects from Neko to C/C++
One of the coolest aspects of Neko objects is that they map directly to haXe class instances.
Pages:
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049