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

Lua has issues with functions returning references #687

Open
fodinabor opened this issue Apr 23, 2016 · 0 comments
Open

Lua has issues with functions returning references #687

fodinabor opened this issue Apr 23, 2016 · 0 comments

Comments

@fodinabor
Copy link
Contributor

fodinabor commented Apr 23, 2016

As reported here: http://polycode.org/community/143-questions-of-a-new-user/p1#p560

The function we're talking of looks like this in C++: const String& getStringValue(const String& configNamespace, const String& key);

The conversion in Lua:

function Config:getStringValue(configNamespace, key)
    local retVal = Polycore.Config_getStringValue(self.__ptr, configNamespace, key)
    if retVal == nil then return nil end
    local __c = _G["String"]("__skip_ptr__")
    __c.__ptr = retVal
    return __c
end

But it still is no string we could work in Lua with.
Version: I guess 0.8.4

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

1 participant