First round of director mods
- Removed asserts - The unused __DIRECTOR__ base class default constructor removed. I've used the conventional approach of having no default constructor rather than a private one (declaring it private doesn't serve any useful purpose when this constructor is not wanted). git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5132 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
638ec81f42
commit
6e052aeb1d
7 changed files with 0 additions and 29 deletions
|
|
@ -73,7 +73,6 @@ private:
|
|||
|
||||
/* decrement the reference count of the wrapped python object */
|
||||
void __decref() const {
|
||||
assert(_self);
|
||||
if (_disown) {
|
||||
Py_DECREF(_self);
|
||||
}
|
||||
|
|
@ -93,11 +92,6 @@ private:
|
|||
#endif
|
||||
|
||||
public:
|
||||
/* the default constructor should not be called */
|
||||
__DIRECTOR__() {
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* wrap a python object, optionally taking ownership */
|
||||
__DIRECTOR__(PyObject* self, int disown): _self(self), _disown(disown) {
|
||||
__incref();
|
||||
|
|
@ -155,7 +149,6 @@ public:
|
|||
/* acquire ownership of the wrapped python object (the sense of "disown"
|
||||
* is from python) */
|
||||
void __disown() const {
|
||||
assert(_self);
|
||||
if (!_disown) {
|
||||
_disown=1;
|
||||
__incref();
|
||||
|
|
@ -164,7 +157,6 @@ public:
|
|||
|
||||
/* increase the reference count of the wrapped python object */
|
||||
void __incref() const {
|
||||
assert(_self);
|
||||
if (_disown) {
|
||||
Py_INCREF(_self);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -473,7 +473,6 @@
|
|||
} else {
|
||||
$input = proxy->__get_self();
|
||||
}
|
||||
assert($input);
|
||||
}
|
||||
}
|
||||
%typemap(inv) SWIGTYPE * {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue