PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 824 - Shiboken doesn't support types with custom new/delete operators.
: Shiboken doesn't support types with custom new/delete operators.
Status: CLOSED WONTFIX
Product: PySide
Classification: Unclassified
Component: Shiboken
: 1.0.1
: All All
: P4 enhancement
Assigned To: Marcelo Lira
:
:
:
  Show dependency treegraph
 
Reported: 2011-04-11 21:17 EEST by Hugo Parente Lima
Modified: 2011-06-22 20:25 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Parente Lima 2011-04-11 21:17:12 EEST
For example:

class Managed
{
    Managed(const Managed &other);
    void operator = (const Managed &other);

public:
    Managed();
    Managed(int foo);
    virtual ~Managed();

    void *operator new(size_t size, MemoryPool *pool);
    void operator delete(void *);
    void operator delete(void *, MemoryPool *);
};

This class *must* be created like this:

MemoryPool mem;
Managed* m = new (&mem) Managed;
Managed* m2 = new (&mem) Managed(2);

IMO, shiboken would create a new Python constructor for each existent
constructor and prepend all extra arguments needed by the new overload, so the
Python user would do:

mem = MemoryPool()
m = Managed(mem)
m2 = Managed(mem, 2)

The ideal situation would be to completely hide the MemoryPool class, but
sometimes it's not possible.
Comment 1 Hugo Parente Lima 2011-05-27 23:38:38 EEST
Marking my own bug as WONTFIX, as it can be considered an exotic use case,
besides the necessary effort needed to fix it brings us not a big step forward,
i.e. much work little gain.
Comment 2 renato filho 2011-06-22 20:25:11 EEST
release 1.0.4