path: root/libshiboken/bindingmanager.h
Commit message (Collapse)AuthorAgeFilesLines
* Implement support to object list on ownserhsip functions.renatofilho2010-09-291-9/+2
| | | | | Reviewer: Marcelo Lira <> Luciano Wolf <>
* Created a new rule to parent ownership.renatofilho2010-09-241-0/+4
| | | | | | | In the new rule if the child object is a Shiboken wrapper class, the object is not invalidade during the parent destructions, the binding manager will wait for object destructor to invalidade the wrapper. Reviewer: Hugo Parente Lima <> Luciano Wolf <>
* Change the license boiler plates of all LGPL files removing the special ↵Hugo Parente Lima2010-09-091-21/+9
| | | | | | | exception. Reviewer: Luciano Wolf <> Renato Araújo <>
* Fix the type resolver algorithm.Hugo Parente Lima2010-08-301-0/+3
| | | | | | | | | | | | | | | | | The new algorithm do the following: - Try to use type_info on the object the get the object real name. - Try to find a type resolver with the name returned by type_info. - If a type resolver was found, get the python type. - Else, ask binding manager to resolve the type walking on all possible subclasses found in the inheritance tree. The binding manager has a graph representing the class inheritance tree. Note: This commit break the libshiboken ABI, but not the API. Reviewer: Luciano Wolf <> Renato Araújo <>
* Add support for multiple inheritance involving more than one C++ object.Hugo Lima2010-03-301-1/+1
* Fix object initialization.Hugo Lima2010-01-131-1/+2
| | | | | | | The C++ object instanciation was made in tp_init function instead of tp_new function. Now tp_new just create a useless python object which will be filled in the tp_init function. Reviewed by Marcelo Lira <>
* Renamed a lot of Shiboken things with "Py" prefix to use "Sbk" prefix.Marcelo Lira2009-12-081-7/+8
| | | | | | | | | | | | | | To avoid confusion of Python stuff with Shiboken generated stuff. For example: a C++ class called "String" would have the PyString_Type wrapper generated for it, mixing with the proper Python PyString_Type; now the generate code will have things like SbkString_Type, SbkString_New, SbkString_someMethod, and so on. PyBaseWrapper and its variants were renamed to SbkBaseWrapper. PyType<T>() is now SbkType<T>() PyEnumObject was renamed to SbkEnumObject.
* Added method to take care of the details of ownership transfer to C++.Marcelo Lira2009-11-301-0/+8
| | | | | | | | | | | | | | | | | | | Simple ownership transference, i.e. without parenting, is now performed by the new BindingManager::transferOwnershipToCpp method. It remove the parent of the transfered object and proceeds transfer or invalidation if needed. The generated code for simple ownership transfer from Python to C++ now reflects this change. Fixed the method BlackBox::keepObjectType that steals an ObjectType ownership to C++ to remove it from its parent also. The BlackBox class does not take care of the stolen object as a proper parent would, but its destructor deletes the object, so the "unparenting" is needed to avoid freeing the same memory twice. Created an unit test that adds children to a parent ObjectType and then steal the children to C++ with BlackBox.keepObjectType. Reviewed by Hugo Lima <>
* Wrapper invalidation method recursively updates children objects status.Marcelo Lira2009-11-301-2/+9
| | | | | | | | | | | BindingManager::invalidateWrapper checks if the object to be invalidated carries any children objects and recursively invalidates them. Shiboken::destroyParentInfo function was refactored to call the new recursive wrapper invalidator and then call a helper function that only destroy the parent information. The invalidate parent test was updated.
* Added convenience method BindingManager::invalidateWrapper(const void*).Marcelo Lira2009-11-261-0/+2
| | | | | | | | This new invalidateWrapper finds the Python wrapper for a C++ pointer and then invalidates it. Virtual destructors for C++ wrappers call the invalidateWrapper on the "this" pointer.
* Added the invalidateWrapper method to BindingManager.Marcelo Lira2009-11-251-1/+3
| | | | | | | | | | | | It sets the wrapper as invalid and removes the relation of C++ objects to the Python wrapper from the mappings. Moved BindingManager::releaseWrapper(void*) to BindingManagerPrivate, since it should only be used by releaseWrapper(PyObject*). Modified includes on conversions.h to use quotes instead of < and >. Reviewed by Hugo Lima <>
* Use google dense hash table instead of std::map in BindingManager.Hugo Lima2009-11-181-1/+0
| | | | Reviewed by Marcelo Lira <>
* Add visibility policies to libshiboken and for bindings generated by ↵Hugo Lima2009-11-121-4/+8
| | | | | | | | | | shiboken generator. As shiboken generator needs minor changes to support inter-module dependencies, these changes about symbol visibility does not support inter-module dependencies, however support it is simple, because we just need to make some symbols visible to other DSO's. Reviewed by Marcelo Lira <>
* the Python wrapper deallocator wasn't removing the Python objectMarcelo Lira2009-11-091-2/+1
| | | | entry from the wrapper to C++ object relation table
* Use const void* instead of void*. This solve the problem when we are insideHugo Lima2009-09-111-5/+6
| | | | a const virtual function and the "this" pointer is const.
* fixed some typos on license platesBruno dos Santos de Araujo2009-09-021-1/+1
* Removed all warningsHugo Lima2009-08-281-1/+1
* The End Is the Beginning Is the EndMarcelo Lira2009-08-171-0/+66