Hi again ;) On Sun, Nov 28, 2010 at 04:30:10PM +0100, Schmurfy wrote: > … callbacks … > do you really think the added complexity of the C code is really worth > what it brings to the lua side ?
Just to make sure I understand your approach correctly: After the script is loaded, check if there is a global function called, for example, "cb_read". If there is, call it every $interval seconds. The script does not call any register_* function for this to happen – defining the function with this special name is sufficient. I think providing the register_* functions is worth the trouble: It is closer to the C API and the interfaces provided by the Perl and Python plugins. The Java API is a bit special because Java doesn't provide function pointers, but you can still register objects implementing a special interface. > I am more than disappointed by the way you took over my plugin Oh, sorry about that :/ I didn't mean to "steal" your plugin, I just got excited and carried away. When I get excited about something I usually start hacking away in a frenzy, sorry … I'll hold myself back. > I am not angry at you (and I hope you won't be at me for being so direct) No offense taken. > I finally managed to compile a working lua plugin on my system the > only problem I had is that the pkg-config package is called "lua" for > me with 5.1 as its version Oh $deity! The pkg-config names are the one thing that should be constant over all platforms … Oh well, I'll see if I can work around that. Best regards, —octo -- Florian octo Forster Hacker in training GnuPG: 0x0C705A15 http://octo.it/
signature.asc
Description: Digital signature
_______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
