Re: *** GMX Spamverdacht *** Re: Trouble running the hello world application

Dennis Schridde <[email protected]> Thu, 13 Sep 2012 13:57:22 +0200
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <7750247.Tjk4uks2md@ernie>
Am Donnerstag, 13. September 2012, 13:38:51 schrieb [email protected]:
> Yes, specifically 5.1.5 (I've mentioned it in the link
> http://pastebin.com/MDt7hzdc in my first post). Can I use require to
> load dynamic libraries?
http://www.lua.org/manual/5.2/manual.html#pdf-package.searchers

You can also do it via package.preload, which is what I do. Like this:
	lua_getglobal(L, "package");
	lua_getfield(L, -1, "preload");
	lua_pushcfunction(L, init_function);
	lua_setfield(L, -2, name); // package.preload[name] = init_function
	lua_pop(L, 2); // pop(package.preload, package)

--Dennis

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEABECAAYFAlBRyiUACgkQjqfyF1DtJW4sXQCdEPObIQKz/4MR1/Z3fFHO5FCA
bY8AoKJ97rdEGTZv2BJy5VDonTFJuWLd
=L43t
-----END PGP SIGNATURE-----