Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CppBinding的问题,无法绑定返回值是TArray的函数 #72

Closed
zengdelang opened this issue Mar 5, 2019 · 2 comments
Closed

CppBinding的问题,无法绑定返回值是TArray的函数 #72

zengdelang opened this issue Mar 5, 2019 · 2 comments

Comments

@zengdelang
Copy link

和Http模块导出相同的问题,在Base类中,添加四个函数,testFunc1, testFunc2, testFunc3, testFunc4,由于testFunc1,testFunc2的返回值是TArray,TArray导致无法导出,无法编译通过

测试代码:
class Base {
LuaClassBody()
public:
virtual ~Base() {
Log::Log("Base object %p had been freed",this);
}

    void baseFunc1() {
        Log::Log("baseFunc1 call");
    }

	TArray<uint8> testFunc1()
    {
        
    }

	TArray<FString> testFunc2()
    {
        
    }

	void testFunc3(TArray<uint8> arr)
    {
        
    }

	void testFunc4(TArray<FString> arr)
	{

	}
};

DefLuaClass(Base)
    DefLuaMethod(baseFunc1,&Base::baseFunc1)
	//DefLuaMethod(testFunc1, &Base::testFunc1)
	//DefLuaMethod(testFunc2, &Base::testFunc2)
	DefLuaMethod(testFunc3, &Base::testFunc3)
	DefLuaMethod(testFunc4, &Base::testFunc4)
EndDef(Base,&NoConstructor)
@pangweiwei
Copy link
Collaborator

嗯,这个问题在之前的这个 issue 也提了,#63

我再等他们pr,当然自己添加也不麻烦。

@pangweiwei
Copy link
Collaborator

fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants