diff options
-rw-r--r-- | lbaselib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.227 2009/11/25 15:27:51 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.228 2009/11/26 11:39:20 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -616,8 +616,7 @@ static int luaB_auxwrap (lua_State *L) { | |||
616 | 616 | ||
617 | static int luaB_cocreate (lua_State *L) { | 617 | static int luaB_cocreate (lua_State *L) { |
618 | lua_State *NL = lua_newthread(L); | 618 | lua_State *NL = lua_newthread(L); |
619 | luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1, | 619 | luaL_checktype(L, 1, LUA_TFUNCTION); |
620 | "Lua function expected"); | ||
621 | lua_pushvalue(L, 1); /* move function to top */ | 620 | lua_pushvalue(L, 1); /* move function to top */ |
622 | lua_xmove(L, NL, 1); /* move function from L to NL */ | 621 | lua_xmove(L, NL, 1); /* move function from L to NL */ |
623 | return 1; | 622 | return 1; |