Bug#360634: lua5.1: Please add bin2c
I think bin2c is best avoided (the Lua authors have the right idea). At the least, it's terribly named: "bin2c" sounds general, yet this tool has the specific job of generating Lua C API code. lua2c? Thanks for the tip, but it is a most useful tool to have. -- http://rrt.sc3d.org/ | fantasize, a. as big as fizzy orange -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#360634: lua5.1: Please add bin2c
> Please add bin2c to the -dev package; it's most useful. LuaBinaries > packages already include it. Hi Reuben, I think bin2c is best avoided (the Lua authors have the right idea). At the least, it's terribly named: "bin2c" sounds general, yet this tool has the specific job of generating Lua C API code. Not /usr/bin material in my opinion. As suggested by Luiz, please consider using xxd: $ apt-get install vim-common # provides "xxd" $ echo "print('hi')" > test.lua $ xxd -i test.lua > test_lua.c Then in your C program (quite easy to make a macro of this): int do_test_lua(lua_State* L) { #include "test_lua.c" return luaL_loadbuffer(L, (void*)test_lua, test_lua_len, "test.lua") || lua_pcall(L, 0, 0, 0); } --John -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#360634: lua5.1: Please add bin2c
Package: lua5.1 Version: 5.1-0bpo1 Severity: wishlist Please add bin2c to the -dev package; it's most useful. LuaBinaries packages already include it. -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.12-hibernate Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages lua5.1 depends on: ii libc62.3.5-1ubuntu17 GNU C Library: Shared libraries an ii libreadline5 5.0-10 GNU readline and history libraries -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]