LuaTinker??Bug?????
???????????? ???????[ 2015/8/19 14:14:12 ] ?????????????????? ??????
????LuaTinker???????????C++??????Lua???????????????????Kwon-il Lee???????????ο???LuaBind???????????????????????????http://gpgstudy.com/gpgiki/LuaTinker ????????????????????μ?????????Git???????https://github.com/zupet/LuaTinker ?????LuaBind??LuaPlus????????????????????????????????1000???У???????????????????????д?????????????????????в????????????????????????????????????????????????ι????????????
???????????????LuaTinker??bug??????????????????в?????????????????????????????????????????лfergzhang????????????????????????
????BUG??????
?????????????int64_t ???????????????????п??????λ???????
????static int lt_s64(lua_State *L)
????{
????//?????п??????λ????????????memcmp
????lua_pushboolean(L?? memcmp(lua_topointer(L?? 1)?? lua_topointer(L?? 2)?? sizeof(long long)) < 0);
????return 1;
????}
?????????????????????????????????__newindex???????п??????????????????LuaTinker??????е??????int lua_tinker::meta_get(lua_State *L) ?????__index?????????????????????????????
int lua_tinker::meta_set(lua_State *L)
{
enum_stack(L);
lua_getmetatable(L?? 1);
lua_pushvalue(L?? 2);
lua_rawget(L?? -2);
enum_stack(L);
if (lua_isuserdata(L?? -1))
{
user2type<var_base *>::invoke(L?? -1)->set(L);
}
else if (lua_isnil(L?? -1))
{
//?????е???invoke_parent(L)???????????
lua_pushvalue(L?? 2);
lua_pushvalue(L?? 3);
lua_rawset(L?? -4);
}
lua_settop(L?? 3);
return 0;
}
??????????bug?????I64d????????????I64d?????????????????????????????????????????????????????????????%lld??
????static int tostring_s64(lua_State *L)
????{
????char temp[64];
????sprintf_s(temp?? "%I64d"?? *(long long*)lua_topointer(L?? 1));
????lua_pushstring(L?? temp);
????return 1;
????}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11