From 7a6664ab1fb9892f089ba0a460cb02f02d2081e1 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 29 Jul 2015 06:58:36 +0000 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding automatically --- .../lua-bindings/auto/api/AudioEngine.lua | 9 ++-- .../auto/lua_cocos2dx_audioengine_auto.cpp | 45 +++++++++++++------ 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua b/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua index 5f4387f5dd..7bd728c1cf 100644 --- a/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua +++ b/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua @@ -122,13 +122,14 @@ -- @return experimental::AudioEngine#experimental::AudioEngine self (return value: cc.experimental::AudioEngine) -------------------------------- --- Preload audio file.
--- param filePath The file path of an audio. --- @function [parent=#AudioEngine] preload +-- @overload self, string, function +-- @overload self, string +-- @function [parent=#AudioEngine] preload -- @param self -- @param #string filePath +-- @param #function callback -- @return experimental::AudioEngine#experimental::AudioEngine self (return value: cc.experimental::AudioEngine) - + -------------------------------- -- Play 2d sound.
-- param filePath The path of an audio file.
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp index a899e762ed..f1ac1aee98 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.cpp @@ -594,7 +594,6 @@ int lua_cocos2dx_audioengine_AudioEngine_preload(lua_State* tolua_S) { int argc = 0; bool ok = true; - #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif @@ -603,22 +602,42 @@ int lua_cocos2dx_audioengine_AudioEngine_preload(lua_State* tolua_S) if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror; #endif - argc = lua_gettop(tolua_S) - 1; + argc = lua_gettop(tolua_S)-1; - if (argc == 1) + do { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:preload"); - if(!ok) + if (argc == 2) { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_preload'", nullptr); - return 0; + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:preload"); + if (!ok) { break; } + std::function arg1; + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if (!ok) { break; } + cocos2d::experimental::AudioEngine::preload(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; } - cocos2d::experimental::AudioEngine::preload(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:preload",argc, 1); + } while (0); + ok = true; + do + { + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:preload"); + if (!ok) { break; } + cocos2d::experimental::AudioEngine::preload(arg0); + lua_settop(tolua_S, 1); + return 1; + } + } while (0); + ok = true; + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "ccexp.AudioEngine:preload",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: