issue #2433:Update typed function and add some manual binding

This commit is contained in:
samuele3hu 2013-08-26 18:09:15 +08:00
parent 6ae80bcaf0
commit c7b0b6791f
8 changed files with 16 additions and 15 deletions

View File

@ -1137,7 +1137,7 @@ void array_to_luaval(lua_State* L,Array* inValue)
if (nullptr == obj) if (nullptr == obj)
continue; continue;
uint32_t typeId = cocos2d::getHashCodeByString(typeid(*obj).name()); uint32_t typeId = typeid(*obj).hash_code();
auto iter = g_luaType.find(typeId); auto iter = g_luaType.find(typeId);
if (g_luaType.end() != iter) if (g_luaType.end() != iter)
{ {
@ -1226,7 +1226,8 @@ void dictionary_to_luaval(lua_State* L, Dictionary* dict)
if (NULL == element) if (NULL == element)
continue; continue;
uint32_t typeId = cocos2d::getHashCodeByString(typeid(element->getObject()).name()); uint32_t typeId = typeid(element->getObject()).hash_code();
auto iter = g_luaType.find(typeId); auto iter = g_luaType.find(typeId);
if (g_luaType.end() != iter) if (g_luaType.end() != iter)
{ {

View File

@ -1 +1 @@
13bc27135b11b87249075c37897972a41802f216 e2ec824824096631a51472eab29643b0f55ef6f3

View File

@ -1 +1 @@
451f7b8e8003474fb17be07923476ea2f12a9122 90eec5befefca388a591c3cf8dc10950588cec15

View File

@ -1 +1 @@
7ec8c685dde8f273f39cb13c8e009d9bca6e0e53 bc27ec5b64be9ac5530fd15fcc22cd8832504685

View File

@ -1 +1 @@
2c817ab849fe61f97c010cf5e9b6528bca2a0396 0389c415199783d5bbcc1ee8882cc01220bc37f6

View File

@ -690,7 +690,7 @@ int register_cocos2dx_extension_CCBProxy(lua_State* tolua_S)
tolua_endmodule(tolua_S); tolua_endmodule(tolua_S);
tolua_endmodule(tolua_S); tolua_endmodule(tolua_S);
uint32_t typeId = cocos2d::getHashCodeByString(typeid(CCBProxy).name()); uint32_t typeId = typeid(CCBProxy).hash_code();
g_luaType[typeId] = "CCBProxy"; g_luaType[typeId] = "CCBProxy";
return 1; return 1;
} }

View File

@ -903,7 +903,7 @@ tolua_lerror:
#endif #endif
} }
static int tolua_cocos2d_Sequence_create(lua_State* tolua_S) int tolua_cocos2d_Sequence_create(lua_State* tolua_S)
{ {
if (NULL == tolua_S) if (NULL == tolua_S)
return 0; return 0;
@ -1279,7 +1279,7 @@ tolua_lerror:
#endif #endif
} }
static int tolua_cocos2d_CardinalSplineBy_create(lua_State* tolua_S) int lua_cocos2d_CardinalSplineBy_create(lua_State* tolua_S)
{ {
if (NULL == tolua_S) if (NULL == tolua_S)
return 0; return 0;
@ -1348,7 +1348,7 @@ tolua_lerror:
#endif #endif
} }
static int tolua_cocos2d_CatmullRomBy_create(lua_State* tolua_S) int tolua_cocos2d_CatmullRomBy_create(lua_State* tolua_S)
{ {
if (NULL == tolua_S) if (NULL == tolua_S)
return 0; return 0;
@ -1412,7 +1412,7 @@ tolua_lerror:
#endif #endif
} }
static int tolua_cocos2d_CatmullRomTo_create(lua_State* tolua_S) int tolua_cocos2d_CatmullRomTo_create(lua_State* tolua_S)
{ {
if (NULL == tolua_S) if (NULL == tolua_S)
return 0; return 0;
@ -1476,7 +1476,7 @@ tolua_lerror:
#endif #endif
} }
static int tolua_cocos2d_BezierBy_create(lua_State* tolua_S) int tolua_cocos2d_BezierBy_create(lua_State* tolua_S)
{ {
if (NULL == tolua_S) if (NULL == tolua_S)
return 0; return 0;
@ -1536,7 +1536,7 @@ tolua_lerror:
#endif #endif
} }
static int tolua_cocos2d_BezierTo_create(lua_State* tolua_S) int tolua_cocos2d_BezierTo_create(lua_State* tolua_S)
{ {
if (NULL == tolua_S) if (NULL == tolua_S)
return 0; return 0;
@ -2497,7 +2497,7 @@ static void extendCardinalSplineBy(lua_State* tolua_S)
if (lua_istable(tolua_S,-1)) if (lua_istable(tolua_S,-1))
{ {
lua_pushstring(tolua_S,"create"); lua_pushstring(tolua_S,"create");
lua_pushcfunction(tolua_S,tolua_cocos2d_CardinalSplineBy_create); lua_pushcfunction(tolua_S,lua_cocos2d_CardinalSplineBy_create);
lua_rawset(tolua_S,-3); lua_rawset(tolua_S,-3);
} }
} }

@ -1 +1 @@
Subproject commit e82fb176bd9a9fa573e3282e6af5ba19a7131633 Subproject commit 98ddf882f2898bc9043ea54d9ed7f32383f6be4d