mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
Added some sleep mode related functions, fixed the example, fixed some things
This commit is contained in:
parent
b4ceb200ea
commit
5494f3d2e5
5 changed files with 34 additions and 4 deletions
|
|
@ -174,13 +174,14 @@ static int httpc_downloadData(lua_State *L) {
|
|||
|
||||
ret = httpcDownloadData(context, buff, size, NULL);
|
||||
if (ret != 0) {
|
||||
free(buff);
|
||||
lua_pushnil(L);
|
||||
lua_pushinteger(L, ret);
|
||||
return 2;
|
||||
}
|
||||
|
||||
lua_pushstring(L, (char*)buff);
|
||||
//free(buff); FIXME we need to free this buffer at some point ?
|
||||
free(buff);
|
||||
//lua_pushinteger(L, size); // only for test purposes.
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue