[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-tech-kern
Subject:    Re: Moving Lua source codes
From:       Marc Balmer <marc () msys ! ch>
Date:       2013-10-24 7:33:06
Message-ID: 5268CD32.6040501 () msys ! ch
[Download RAW message or body]

Am 21.10.13 07:57, schrieb Artem Falcon:

[...]

> Doing w/o a diff, i don't have a sane mail environment now to send it inline.
> 
> There's few more things.
> First: you forgot to add MODULE_CLASS_LUA_BINDING to a
> sys/sys/module.h.

FWIW, I removed the MODULE_CLASS_LUA_BINDING and use the existing
MODULE_CLASS_MISC for Lua bindings.  "require 'foo'" will look for a
kernel module with the name "luafoo" and load it, if existing.  It is
the up to "luafoo" to register whatever it has to offer.

In the unlike case that "luafoo" was something else than a Lua binding,
it would be loaded, but provide no functionality.  That is the only
side-effect I can think of right now.  So I think "require" can not be
abused to load arbitrary modules, since they must be prefixed by "lua".



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic