diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-02-06 14:48:51 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-02-06 14:48:51 +0100 |
| commit | e93ad4643202b6227ea9e4ab765cbb272c9d2413 (patch) | |
| tree | e821cd6c358b359b67afecc85edcdfe1043d5571 /python | |
| parent | 7e0a6a8421d0b1de85a69fad80c24b494385a1bf (diff) | |
| download | python-apt-e93ad4643202b6227ea9e4ab765cbb272c9d2413.tar.gz | |
python/tag.cc: cleanup
Diffstat (limited to 'python')
| -rw-r--r-- | python/tag.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/python/tag.cc b/python/tag.cc index b680dc02..88a48df9 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -413,27 +413,23 @@ static PyObject *TagFileNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) return 0; } + New = (TagFileData*)type->tp_alloc(type, 0); if (fileno > 0) { - New = (TagFileData*)type->tp_alloc(type, 0); #ifdef APT_HAS_GZIP new (&New->Fd) FileFd(); New->Fd.OpenDescriptor(fileno, FileFd::ReadOnlyGzip, false); #else new (&New->Fd) FileFd(fileno,false); #endif - New->Owner = File; - Py_INCREF(New->Owner); - new (&New->Object) pkgTagFile(&New->Fd); } else { - New = (TagFileData*)type->tp_alloc(type, 0); new (&New->Fd) FileFd(filename, FileFd::ReadOnly, FileFd::Extension, false); - New->Owner = File; - Py_INCREF(New->Owner); - new (&New->Object) pkgTagFile(&New->Fd); } + New->Owner = File; + Py_INCREF(New->Owner); + new (&New->Object) pkgTagFile(&New->Fd); // Create the section New->Section = (TagSecData*)(&PyTagSection_Type)->tp_alloc(&PyTagSection_Type, 0); |
