diff options
author | chai <chaifix@163.com> | 2018-05-18 14:39:38 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-05-18 14:39:38 +0800 |
commit | 1b773ad2c250e09c09c065eb3eec64bfebde09ca (patch) | |
tree | b3f1f367694d5f86cc0caa7f4eea2e6a1d3424c5 /src/script/audio/luaopen_audio.cpp | |
parent | 91a592da979827b1735901388dba8712e6e3ecf3 (diff) |
修改userdata创建方式
Diffstat (limited to 'src/script/audio/luaopen_audio.cpp')
-rw-r--r-- | src/script/audio/luaopen_audio.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/script/audio/luaopen_audio.cpp b/src/script/audio/luaopen_audio.cpp index f170115..78d7a69 100644 --- a/src/script/audio/luaopen_audio.cpp +++ b/src/script/audio/luaopen_audio.cpp @@ -22,7 +22,7 @@ namespace lua return 0; } - + static const luaL_Reg f[] = { {"init", l_init}, {"Sound", l_newSound}, @@ -31,7 +31,8 @@ namespace lua int luaopen_audio(lua_State* L) { - + luax_newlib(L, f); + return 1; } } |