Hi again.
Please show me some examples for such functions as:
EXTERN neko_module *neko_read_module( reader r, readp p, value loader );
EXTERN int neko_file_reader( readp p, void *buf, int size ); // FILE *
EXTERN int neko_string_reader( readp p, void *buf, int size ); //
string_pos *
EXTERN value neko_select_file( value path, const char *file, const char
*ext );
EXTERN void neko_global_init( void *s );
EXTERN void neko_set_stack_base( void *s );
EXTERN void neko_global_free();
EXTERN int neko_thread_create( thread_main_func init, thread_main_func
main, void *param, void *handle );
You could just reffer me to a proper place in sources and explain what
that means.
Also, some questions.
How to get a list of imported modules?
When module "M" imported in python it can be accessed from "__main__"
module as __main__.M. So, this "__main__" is global namespace. I can
store function, variable, types, modules, whatever in this namespace as
in any other module or namespace. This is verya handy during languages
cooperation, because I can write in python something like that:
This code runs in global namespace
a = 5
lua.eval("python.a*python.a") # result is 25
So as you can see value of "a" is stored in python, and it could be
accessed from lua as "python.a".
Do you have such global/general/main module in Neko? If not, then my
wrapper must have access to any active/imported/loaded module as it
described in example http://nekovm.org/doc/vm
How to work with Neko's arrays from C? And how to expose array like
objects from C to Neko?
Can I make objects with overloaded operation of + - * / and other (like
in C++, I can overload operator+)? As I can see Neko arrays is something
like tuple in python. It's a pitty that you don't have dict/map type.
Do Neko's objects have callable aspect? In python we can call (and use
with same interface) function, bounded methods and objects of class with
"__call__" method.
Best regards. I hope to get your feedback ASAP.
--
Neko : One VM to run them all
(http://nekovm.org)