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

Override dead bindings when registering a new binding. #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 26, 2015

  1. BindingManagerPrivate::assignWrapper will override existing bindings.

    This is needed to handle the case where the underlying C++ object is deleted, but its Python wrapper is still alive. If a new C++ object is allocated at the same address, it needs to override the old binding to prevent the situation where the old binding is reused. If the old binding is not replaced, a C++ object may be bound to a Python wrapper for different object type. (Or worse, a C++ object is bound to a Python object which no longer exists.)
    codewarrior0 committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    bf8169e View commit details
    Browse the repository at this point in the history
  2. Add a method to the shiboken module for discovering the binding reg…

    …istered for a C++ object.
    
    This allows you to assert that `shiboken.getBinding(shiboken.getCppPointer(obj)[0]) is obj`, which was not true in the issue I was investigating.
    codewarrior0 committed Oct 26, 2015
    Configuration menu
    Copy the full SHA
    817d49a View commit details
    Browse the repository at this point in the history