Hello nekolist,

I'm trying to write a program that has some functions that I would
like to expose to the embedded VM, but I've had very little success of
doing that. I had no problems with embedding the NekoVM, and call the
main function of a haXe script.

I've tried to do several things, using the DEFINEPRIM macro to define
the function, tried to store the function as a field of the module and
call it that way. But I'm out of luck.

Basically right now I want to watch files using the iNotify API, first
I tried to just make an ndll that exports a function that just watches
a directory. But that did not go so well, by some strange fluke the c
standard read function became non-blocking, so it did return even
though there was no data from iNotify. Which means that the "idling"
background program utilized one core to 100%, which is not good in the
long run for a laptop (Especially not one in the HP Pavilion series).

So therefore I tried to host the VM from inside my application, but I
found the documentation a bit coarse in that section - and I'm not
very used to C/C++ at all. Haven't been using them for a great time.

I've read some of the mailinglist and found out about stuff like
xcross, nme and other things. Seems to me like you mostly
discusses/get questions about co-routines? Anyway I hope for that
someone could show me a snippet that I can wrap my winter-tired head
around that puts a host c function into the NekoVM so it is usable
from haXe.

Thanks in advance!

Med vänliga hälsningar / best regards
→ Frank M. Eriksson ( http://knarf.se/ )
Office / Kontorsnr :(+46)18 - 490 24 42

--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to