From 22c4dc62966dfd0c7c3f15dd25aebcdb2a26be76 Mon Sep 17 00:00:00 2001 From: likun123687 Date: Fri, 10 Feb 2023 16:05:52 +0800 Subject: [PATCH] fix cpp_object usertype error fix usertype_call_from_c++.cpp cpp_object usertype error --- examples/source/usertype_call_from_c++.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/source/usertype_call_from_c++.cpp b/examples/source/usertype_call_from_c++.cpp index 55d790c0..5b2c364a 100644 --- a/examples/source/usertype_call_from_c++.cpp +++ b/examples/source/usertype_call_from_c++.cpp @@ -24,7 +24,7 @@ int main(int, char*[]) { }; lua.new_usertype( - "test", "value", &cpp_object::value); + "cpp_object", "value", &cpp_object::value); lua.new_usertype("test", "func", &test::func); lua.script( "function test:lua_func(obj) print('lua_func', " @@ -48,4 +48,4 @@ int main(int, char*[]) { // lua["test"]["lua_func"](cppobj); return 0; -} \ No newline at end of file +}