summaryrefslogtreecommitdiff
path: root/python/generic.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-01-13 17:49:44 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-01-13 17:49:44 +0100
commit9e13c9a669959cac7ff4983f36eeede8039cb6eb (patch)
tree3778f55d63c20956cbb7ddee790d6ef69d26e267 /python/generic.cc
parentc906abf5f25479483041636813117c48556f389b (diff)
parent85839f4f241c99f9e4ebb0a6a8847a2d433f1160 (diff)
downloadpython-apt-9e13c9a669959cac7ff4983f36eeede8039cb6eb.tar.gz
merge from the debian branch
Diffstat (limited to 'python/generic.cc')
-rw-r--r--python/generic.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/generic.cc b/python/generic.cc
index 044569b9..7309d978 100644
--- a/python/generic.cc
+++ b/python/generic.cc
@@ -4,7 +4,7 @@
/* ######################################################################
generic - Some handy functions to make integration a tad simpler
-
+
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
@@ -24,10 +24,10 @@ PyObject *HandleErrors(PyObject *Res)
_error->Discard();
return Res;
}
-
+
if (Res != 0)
Py_DECREF(Res);
-
+
string Err;
int errcnt = 0;
while (_error->empty() == false)
@@ -55,7 +55,7 @@ const char **ListToCharChar(PyObject *List,bool NullTerm)
int Length = PySequence_Length(List);
const char **Res = new const char *[Length + (NullTerm == true?1:0)];
for (int I = 0; I != Length; I++)
- {
+ {
PyObject *Itm = PySequence_GetItem(List,I);
if (PyString_Check(Itm) == 0)
{
@@ -80,12 +80,12 @@ PyObject *CharCharToList(const char **List,unsigned long Size)
for (const char **I = List; *I != 0; I++)
Size++;
}
-
+
// Convert the whole configuration space into a list
PyObject *PList = PyList_New(Size);
for (unsigned long I = 0; I != Size; I++, List++)
PyList_SetItem(PList,I,PyString_FromString(*List));
-
+
return PList;
}
/*}}}*/