Code Monkey home page Code Monkey logo

Comments (3)

tripleslash avatar tripleslash commented on June 17, 2024

Has to be some bug with the shared_ptr recognition. Doesn't recognize it as holder type somehow.

from luabind-deboostified.

decimad avatar decimad commented on June 17, 2024

Hello, this is an incompatibility I intridocuded when taking the whole thing apart.
The original luabind did all kinds of conversion trickery stuff so you could give any parameter at any of the 4 template argument indices. I switched to <class, base or base list, holder type, wrapper type>. The holder type is what you're trying to achieve there. The fix for your case would be to introduce a "luabind::no_bases" inbetween the parameters. That being said - the luabind I forked from was incredibly buggy with regards to shared pointers, which leads to the point where shared counts get fragmented, which again leads literally to death. As I noted in your first post, I have a version in personal use that preserves smart pointer integrity without resorting to custom deleter tricks that don't work anyways (if interested also have a look at the corresponding bug report in oberon's repo). However I made that change while also allocating user data memory from within the generated constructors (to store any size of object per value in one place), which basically breaks the luabind class machinery on the lua side (Ie. defining classes or deriving from wrap_base classes), because they relied on the constructor to in-place-construct into prescribed memory boundaries (which means that the prepared memory only really holds a pointer to the real object in the end if it was larger than 16 bytes or something). So it's currently a technical problem to somehow make that work again. I consider backporting the smart-pointer stuff so not too much time passes by until I fixed the classes. I also need to work out the implicit casting of smart pointers (which "worked" in the original source because the smart pointers were just stripped away, introducing the said problems).

To the initial problem: Is the "any parameter at any parameter index"-thingy that luabind had wanted? If so, I will reintroduce it and see if I can document it better so that anybody knows what's going on. I found it to be unintuitive when working on that part.

Thank you for your feedback, this really helps me a lot!

from luabind-deboostified.

tripleslash avatar tripleslash commented on June 17, 2024

Hey, huge thanks for that! I should have seen the bases template parameter.
Anything new regarding smart_ptr support?

from luabind-deboostified.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.