ezpresso ezpresso - 1 year ago 93
C Question

What are neko_vm_custom() and neko_vm_set_custom() for?

I am embedding Neko VM into my desktop application. I did a lot of searching, but I am still unable to find out any helpful information regarding these 2 functions, which are declared in the


void *neko_vm_custom( neko_vm *vm, vkind k );
void neko_vm_set_custom( neko_vm *vm, vkind k, void *v );

What are these functions for?

Update 1

Got some response here.

Answer Source

with neko_vm_set_custom you can attach a custom variable (a context for example) of a user defined kind to your neko virtual machine.

with neko_vm_custom you get that variable of that kind back.

an example might be: you have one or more vm's running, which are connected to their databases. with neko_vm_set_custom you attach the database connection for specific vm and with neko_vm_custom you can get it back.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download