-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with luaext from ndless-sdk #287
Comments
This is actually not OS specific, but was introduced with #263. On exit, it performs more cleanup, so after returning from #288 makes it possible to skip that cleanup (previously that was even done when using |
Thank you for your answer,I'm sending you this message because I'm not sure I understood correctly. I am not very good at computers.For information, I compiled the sdk a week ago. So I think I have version # 288.So from what I understand, luaextdemo.c should be like below:
#include <os.h>
#include <lauxlib.h>
#include <nucleus.h>
static int hello(lua_State *L) {
const char *param = luaL_checkstring(L, 1);
printf("hello %s!\n", param);
return 0;
//_exit(0);
}
static const luaL_reg lualib[] = {
{"hello", hello},
{NULL, NULL}
};
int main(void) {
lua_State *L = nl_lua_getstate();
if (!L) return 0; // not being called as Lua module
luaL_register(L, "luaextdemo", lualib);
//return 0; //moi original qui crash
_exit(0); //devrait éviter le crash
//return EXIT_SUCCESS;
}
That's right ?
But this source code crash when i'm testing...
Thanks in advance...
|
Well when you answer by email there it goes on the issue, so your message wasn't actually private ;)
Anyway, the "#288" is the proposed patch / bugfix. It's not in the version you built. The good news is that it will be very easy for you to get it once it's available officially ("merged"), basically you'll have to update and run "make" again, that's about it. Then you re-build your program (or in this case, the example), and it should work fine.
|
Thank you for your answer. |
For the fix in luaextdemo to work you need the other part of #288 as well. Without that, the change does nothing. |
Hello,
Adriweb from tiplanet told me to send you this message because i have a problem when running runluaextdemo from ndless-sdk. I have a ti nspire cx cas os 4.5.*.
The others examples seems to launch correctly.
There is a probably an error in sdless-sdk or i make a mistake but i don't know where...
Can you do something ?
Thanks
The text was updated successfully, but these errors were encountered: