diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-29 11:02:42 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-29 11:02:42 +0200 |
| commit | cdaebccd5f7a5a0e23a9be7989b64850fabafed1 (patch) | |
| tree | 52d3bd94c02ae9be75fb11bfd423043ef10838cc /python/metaindex.cc | |
| parent | 57624b5df523c0b3a3ebc1741680f283ee1fbbcd (diff) | |
| parent | 340f6a3d54f5705801267f365fb08b5d20228fe6 (diff) | |
| download | python-apt-cdaebccd5f7a5a0e23a9be7989b64850fabafed1.tar.gz | |
merged from debian-sid
Diffstat (limited to 'python/metaindex.cc')
| -rw-r--r-- | python/metaindex.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/python/metaindex.cc b/python/metaindex.cc index 2dcade7d..a00cf04e 100644 --- a/python/metaindex.cc +++ b/python/metaindex.cc @@ -27,7 +27,7 @@ static PyObject *MetaIndexGetDist(PyObject *Self,void*) { static PyObject *MetaIndexGetIsTrusted(PyObject *Self,void*) { metaIndex *meta = GetCpp<metaIndex*>(Self); - return Py_BuildValue("i",(meta->IsTrusted())); + return PyBool_FromLong((meta->IsTrusted())); } static PyObject *MetaIndexGetIndexFiles(PyObject *Self,void*) { @@ -48,10 +48,13 @@ static PyObject *MetaIndexGetIndexFiles(PyObject *Self,void*) { } static PyGetSetDef MetaIndexGetSet[] = { - {"dist",MetaIndexGetDist}, - {"index_files",MetaIndexGetIndexFiles}, - {"is_trusted",MetaIndexGetIsTrusted}, - {"uri",MetaIndexGetURI}, + {"dist",MetaIndexGetDist,0,"The distribution, as a string."}, + {"index_files",MetaIndexGetIndexFiles,0, + "A list of all IndexFile objects associated with this meta index."}, + {"is_trusted",MetaIndexGetIsTrusted,0, + "A boolean value determining whether the file can be trusted."}, + {"uri",MetaIndexGetURI,0, + "The uri the meta index is located at."}, {} }; @@ -66,6 +69,11 @@ static PyObject *MetaIndexRepr(PyObject *Self) } #undef S + +static const char *metaindex_doc = + "Provide information on meta-indexes (i.e. Release files), such as\n" + "whether they are trusted or their URI."; + PyTypeObject PyMetaIndex_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) @@ -89,7 +97,7 @@ PyTypeObject PyMetaIndex_Type = 0, // tp_setattro 0, // tp_as_buffer Py_TPFLAGS_DEFAULT, // tp_flags - "apt_pkg.MetaIndex Object", // tp_doc + metaindex_doc, // tp_doc 0, // tp_traverse 0, // tp_clear 0, // tp_richcompare |
