1
0

Added a deprecation warning to the old style API.

This completes #121.
This commit is contained in:
madmaxoft 2013-08-21 21:32:40 +02:00
parent f3a0fed724
commit e263fc7c72

View File

@ -892,6 +892,7 @@ static int tolua_cPluginManager_AddHook(lua_State * tolua_S)
else if (tolua_isusertype(S, ParamIdx, "cPlugin", 0, &err) && lua_isnumber(S, ParamIdx + 1))
{
// The next params are a cPlugin and a number, assume style 3 or 4
LOGINFO("cPluginManager.AddHook(): Deprecated format used, use cPluginManager.AddHook(HOOK_TYPE, CallbackFunction) instead. Fixing the call for you.");
return tolua_cPluginManager_AddHook_DefFn(PlgMgr, S, ParamIdx);
}