diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-08 11:59:57 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-08 12:09:49 -0300 |
commit | f38e34a3a987f15e947d45efb0ef7ffeb7f3275e (patch) | |
tree | 4908d7da9ea33cb6e19378633e0a401b57c0ef65 /libshiboken/basewrapper.cpp | |
parent | dc1ca0f9a9aa216973a6ab1f458f0f965033530d (diff) |
Renamed a lot of Shiboken things with "Py" prefix to use "Sbk" prefix.
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.
Diffstat (limited to 'libshiboken/basewrapper.cpp')
-rw-r--r-- | libshiboken/basewrapper.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp index 3a2bc9964..6653c8ab5 100644 --- a/libshiboken/basewrapper.cpp +++ b/libshiboken/basewrapper.cpp @@ -39,7 +39,7 @@ namespace Shiboken { -void removeParent(PyBaseWrapper* child) +void removeParent(SbkBaseWrapper* child) { if (child->parentInfo->parent) { ShiboChildrenList& oldBrothers = child->parentInfo->parent->parentInfo->children; @@ -56,8 +56,8 @@ void setParent(PyObject* parent, PyObject* child) bool parentIsNull = !parent || parent == Py_None; - PyBaseWrapper* parent_ = reinterpret_cast<PyBaseWrapper*>(parent); - PyBaseWrapper* child_ = reinterpret_cast<PyBaseWrapper*>(child); + SbkBaseWrapper* parent_ = reinterpret_cast<SbkBaseWrapper*>(parent); + SbkBaseWrapper* child_ = reinterpret_cast<SbkBaseWrapper*>(child); if (!child_->parentInfo) child_->parentInfo = new ShiboParentInfo; @@ -84,13 +84,13 @@ void setParent(PyObject* parent, PyObject* child) } } -static void _destroyParentInfo(PyBaseWrapper* obj, bool removeFromParent) +static void _destroyParentInfo(SbkBaseWrapper* obj, bool removeFromParent) { if (removeFromParent && obj->parentInfo->parent) removeParent(obj); ShiboChildrenList::iterator it = obj->parentInfo->children.begin(); for (; it != obj->parentInfo->children.end(); ++it) { - PyBaseWrapper*& child = *it; + SbkBaseWrapper*& child = *it; _destroyParentInfo(child, false); Py_DECREF(child); } @@ -98,13 +98,13 @@ static void _destroyParentInfo(PyBaseWrapper* obj, bool removeFromParent) obj->parentInfo = 0; } -void destroyParentInfo(PyBaseWrapper* obj, bool removeFromParent) +void destroyParentInfo(SbkBaseWrapper* obj, bool removeFromParent) { BindingManager::instance().invalidateWrapper(obj); _destroyParentInfo(obj, removeFromParent); } -PyObject* PyBaseWrapper_New(PyTypeObject* instanceType, +PyObject* SbkBaseWrapper_New(PyTypeObject* instanceType, const void* cptr, unsigned int hasOwnership, unsigned int containsCppWrapper) @@ -113,7 +113,7 @@ PyObject* PyBaseWrapper_New(PyTypeObject* instanceType, return 0; ShiboTypeObject* const& instanceType_ = reinterpret_cast<ShiboTypeObject*>(instanceType); - PyBaseWrapper* self = (PyBaseWrapper*)instanceType_->pytype.tp_alloc((PyTypeObject*) instanceType, 0); + SbkBaseWrapper* self = (SbkBaseWrapper*)instanceType_->pytype.tp_alloc((PyTypeObject*) instanceType, 0); self->cptr = const_cast<void*>(cptr); self->hasOwnership = hasOwnership; @@ -139,16 +139,16 @@ PyObject* PyBaseWrapper_New(PyTypeObject* instanceType, bool cppObjectIsInvalid(PyObject* wrapper) { - if (wrapper == Py_None || ((Shiboken::PyBaseWrapper*)wrapper)->validCppObject) + if (wrapper == Py_None || ((Shiboken::SbkBaseWrapper*)wrapper)->validCppObject) return false; PyErr_SetString(PyExc_RuntimeError, "internal C++ object already deleted."); return true; } -void PyBaseWrapper_Dealloc_PrivateDtor(PyObject* self) +void SbkBaseWrapper_Dealloc_PrivateDtor(PyObject* self) { BindingManager::instance().releaseWrapper(self); - Py_TYPE(((PyBaseWrapper*)self))->tp_free((PyObject*)self); + Py_TYPE(((SbkBaseWrapper*)self))->tp_free((PyObject*)self); } } // namespace Shiboken |