summaryrefslogtreecommitdiff
path: root/python/sourcelist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python/sourcelist.cc')
-rw-r--r--python/sourcelist.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/python/sourcelist.cc b/python/sourcelist.cc
index 48b3b7c8..15311e94 100644
--- a/python/sourcelist.cc
+++ b/python/sourcelist.cc
@@ -97,13 +97,21 @@ static PyGetSetDef PkgSourceListGetSet[] = {
{}
};
+static PyObject *PkgSourceListNew(PyTypeObject *type,PyObject *args,PyObject *kwds)
+{
+ char *kwlist[] = {0};
+ if (PyArg_ParseTupleAndKeywords(args,kwds,"",kwlist) == 0)
+ return 0;
+ return CppPyObject_NEW<pkgSourceList*>(type,new pkgSourceList());
+}
+
PyTypeObject PkgSourceListType =
{
PyObject_HEAD_INIT(&PyType_Type)
#if PY_MAJOR_VERSION < 3
0, // ob_size
#endif
- "pkgSourceList", // tp_name
+ "apt_pkg.SourceList", // tp_name
sizeof(CppPyObject<pkgSourceList*>), // tp_basicsize
0, // tp_itemsize
// Methods
@@ -133,6 +141,14 @@ PyTypeObject PkgSourceListType =
PkgSourceListMethods, // tp_methods
0, // tp_members
PkgSourceListGetSet, // tp_getset
+ 0, // tp_base
+ 0, // tp_dict
+ 0, // tp_descr_get
+ 0, // tp_descr_set
+ 0, // tp_dictoffset
+ 0, // tp_init
+ 0, // tp_alloc
+ PkgSourceListNew, // tp_new
};
PyObject *GetPkgSourceList(PyObject *Self,PyObject *Args)