summaryrefslogtreecommitdiffstats
path: root/libshiboken/basewrapper_p.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-23 14:56:27 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-23 14:58:15 -0200
commit521cf2b6190a89ecaf19fff925c75bb47b72fa49 (patch)
tree454a90c8211326a4046e76e13141389ddab14de0 /libshiboken/basewrapper_p.h
parent81a8bd714bf4ea7783277052da932d8a7a909fd1 (diff)
parent605bbf8d03eaf5c90b1efdb17eabfa66fedc24be (diff)
downloadshiboken-521cf2b6190a89ecaf19fff925c75bb47b72fa49.tar.gz
shiboken-521cf2b6190a89ecaf19fff925c75bb47b72fa49.tar.xz
shiboken-521cf2b6190a89ecaf19fff925c75bb47b72fa49.zip
Merge branch 'fixapi'
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org> Conflicts: generator/cppgenerator.cpp libshiboken/basewrapper.cpp libshiboken/basewrapper_p.h
Diffstat (limited to 'libshiboken/basewrapper_p.h')
-rw-r--r--libshiboken/basewrapper_p.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/libshiboken/basewrapper_p.h b/libshiboken/basewrapper_p.h
index 428159e0..b90aaa45 100644
--- a/libshiboken/basewrapper_p.h
+++ b/libshiboken/basewrapper_p.h
@@ -28,7 +28,7 @@
#include <map>
struct SbkObject;
-struct SbkBaseType;
+struct SbkObjectType;
namespace Shiboken
{
@@ -81,7 +81,7 @@ struct SbkObjectPrivate
};
-struct SbkBaseTypePrivate
+struct SbkObjectTypePrivate
{
int* mi_offsets;
MultipleInheritanceInitFunction mi_init;
@@ -125,7 +125,7 @@ class HierarchyVisitor
public:
HierarchyVisitor() : m_wasFinished(false) {}
virtual ~HierarchyVisitor() {}
- virtual void visit(SbkBaseType* node) = 0;
+ virtual void visit(SbkObjectType* node) = 0;
void finish() { m_wasFinished = true; };
bool wasFinished() const { return m_wasFinished; }
private:
@@ -137,7 +137,7 @@ class BaseCountVisitor : public HierarchyVisitor
public:
BaseCountVisitor() : m_count(0) {}
- void visit(SbkBaseType*)
+ void visit(SbkObjectType*)
{
m_count++;
}
@@ -152,21 +152,21 @@ class BaseAccumulatorVisitor : public HierarchyVisitor
public:
BaseAccumulatorVisitor() {}
- void visit(SbkBaseType* node)
+ void visit(SbkObjectType* node)
{
m_bases.push_back(node);
}
- std::list<SbkBaseType*> bases() const { return m_bases; }
+ std::list<SbkObjectType*> bases() const { return m_bases; }
private:
- std::list<SbkBaseType*> m_bases;
+ std::list<SbkObjectType*> m_bases;
};
class GetIndexVisitor : public HierarchyVisitor
{
public:
GetIndexVisitor(PyTypeObject* desiredType) : m_index(-1), m_desiredType(desiredType) {}
- virtual void visit(SbkBaseType* node)
+ virtual void visit(SbkObjectType* node)
{
m_index++;
if (PyType_IsSubtype(reinterpret_cast<PyTypeObject*>(node), m_desiredType))
@@ -183,7 +183,7 @@ class DtorCallerVisitor : public HierarchyVisitor
{
public:
DtorCallerVisitor(SbkObject* pyObj) : m_count(0), m_pyObj(pyObj) {}
- void visit(SbkBaseType* node);
+ void visit(SbkObjectType* node);
private:
int m_count;
SbkObject* m_pyObj;
@@ -211,14 +211,14 @@ inline int getNumberOfCppBaseClasses(PyTypeObject* baseType)
return visitor.count();
}
-inline std::list<SbkBaseType*> getCppBaseClasses(PyTypeObject* baseType)
+inline std::list<SbkObjectType*> getCppBaseClasses(PyTypeObject* baseType)
{
BaseAccumulatorVisitor visitor;
walkThroughClassHierarchy(baseType, &visitor);
return visitor.bases();
}
-namespace Wrapper
+namespace Object
{
/**
* Decrements the reference counters of every object referred by self.
@@ -230,7 +230,8 @@ void clearReferences(SbkObject* self);
* Destroy internal data
**/
void deallocData(SbkObject* self, bool doCleanup);
-} // namespace Wrapper
+
+} // namespace Object
} // namespace Shiboken