mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Merge pull request #175 from looki/develop
Fix 'expected .. received ..' message for function arguments
This commit is contained in:
commit
dcff206d05
|
@ -4607,7 +4607,7 @@ namespace sol {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (t != type::userdata && t != type::table) {
|
if (t != type::userdata && t != type::table) {
|
||||||
handler(L, index, t, type::function);
|
handler(L, index, type::function, t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Do advanced check for call-style userdata?
|
// Do advanced check for call-style userdata?
|
||||||
|
@ -4615,13 +4615,13 @@ namespace sol {
|
||||||
lua_getmetatable(L, index);
|
lua_getmetatable(L, index);
|
||||||
if (lua_isnoneornil(L, -1)) {
|
if (lua_isnoneornil(L, -1)) {
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
handler(L, index, t, type::function);
|
handler(L, index, type::function, t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
lua_getfield(L, -1, &callkey[0]);
|
lua_getfield(L, -1, &callkey[0]);
|
||||||
if (lua_isnoneornil(L, -1)) {
|
if (lua_isnoneornil(L, -1)) {
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
handler(L, index, t, type::function);
|
handler(L, index, type::function, t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// has call, is definitely a function
|
// has call, is definitely a function
|
||||||
|
@ -4640,7 +4640,7 @@ namespace sol {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (t != type::userdata) {
|
if (t != type::userdata) {
|
||||||
handler(L, index, t, type::function);
|
handler(L, index, type::function, t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -194,7 +194,7 @@ namespace sol {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (t != type::userdata && t != type::table) {
|
if (t != type::userdata && t != type::table) {
|
||||||
handler(L, index, t, type::function);
|
handler(L, index, type::function, t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Do advanced check for call-style userdata?
|
// Do advanced check for call-style userdata?
|
||||||
|
@ -202,13 +202,13 @@ namespace sol {
|
||||||
lua_getmetatable(L, index);
|
lua_getmetatable(L, index);
|
||||||
if (lua_isnoneornil(L, -1)) {
|
if (lua_isnoneornil(L, -1)) {
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
handler(L, index, t, type::function);
|
handler(L, index, type::function, t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
lua_getfield(L, -1, &callkey[0]);
|
lua_getfield(L, -1, &callkey[0]);
|
||||||
if (lua_isnoneornil(L, -1)) {
|
if (lua_isnoneornil(L, -1)) {
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
handler(L, index, t, type::function);
|
handler(L, index, type::function, t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// has call, is definitely a function
|
// has call, is definitely a function
|
||||||
|
@ -227,7 +227,7 @@ namespace sol {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (t != type::userdata) {
|
if (t != type::userdata) {
|
||||||
handler(L, index, t, type::function);
|
handler(L, index, type::function, t);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user