From 3e5c628641ae4e82c3433892f1df9ce44e29ae12 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 21 Jul 2009 17:59:36 +0200 Subject: python/python-apt.h: Export PyAcquireWorker and fix some problems. --- python/python-apt.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'python/python-apt.h') diff --git a/python/python-apt.h b/python/python-apt.h index d2693920..940963cf 100644 --- a/python/python-apt.h +++ b/python/python-apt.h @@ -29,6 +29,7 @@ struct _PyAptPkgAPIStruct { PyTypeObject *acquirefile_type; PyTypeObject *acquireitem_type; PyTypeObject *acquireitemdesc_type; + PyTypeObject *acquireworker_type; PyTypeObject *actiongroup_type; PyTypeObject *cache_type; PyTypeObject *cachefile_type; @@ -62,6 +63,7 @@ struct _PyAptPkgAPIStruct { # define PyAcquireFile_Type *(_PyAptPkg_API->acquirefile_type) # define PyAcquireItem_Type *(_PyAptPkg_API->acquireitem_type) # define PyAcquireItemDesc_Type *(_PyAptPkg_API->acquireitemdesc_type) +# define PyAcquireWorker_Type *(_PyAptPkg_API->acquireworker_type) # define PyActionGroup_Type *(_PyAptPkg_API->actiongroup_type) # define PyCache_Type *(_PyAptPkg_API->cache_type) # define PyCacheFile_Type *(_PyAptPkg_API->cachefile_type) @@ -122,6 +124,7 @@ static int import_apt_pkg(void) { # define PyAcquireFile_Check(op) PyObject_TypeCheck(op, &PyAcquireFile_Type) # define PyAcquireItem_Check(op) PyObject_TypeCheck(op, &PyAcquireItem_Type) # define PyAcquireItemDesc_Check(op) PyObject_TypeCheck(op, &PyAcquireItemDesc_Type) +# define PyAcquireWorker_Check(op) PyObject_TypeCheck(op, &PyAcquireWorker_Type) # define PyActionGroup_Check(op) PyObject_TypeCheck(op, &PyActionGroup_Type) # define PyCache_Check(op) PyObject_TypeCheck(op, &PyCache_Type) # define PyCacheFile_Check(op) PyObject_TypeCheck(op, &PyCacheFile_Type) @@ -153,6 +156,7 @@ static int import_apt_pkg(void) { # define PyAcquireFile_CheckExact(op) (Py_TYPE(op) == &PyAcquireFile_Type) # define PyAcquireItem_CheckExact(op) (Py_TYPE(op) == &PyAcquireItem_Type) # define PyAcquireItemDesc_CheckExact(op) (Py_TYPE(op) == &PyAcquireItemDesc_Type) +# define PyAcquireWorker_CheckExact(op) (Py_TYPE(op) == &PyAcquireWorker_Type) # define PyActionGroup_CheckExact(op) (Py_TYPE(op) == &PyActionGroup_Type) # define PyCache_CheckExact(op) (Py_TYPE(op) == &PyCache_Type) # define PyCacheFile_CheckExact(op) (Py_TYPE(op) == &PyCacheFile_Type) @@ -185,6 +189,7 @@ static int import_apt_pkg(void) { # define PyAcquireFile_ToCpp GetCpp # define PyAcquireItem_ToCpp GetCpp # define PyAcquireItemDesc_ToCpp GetCpp +# define PyAcquireWorker_ToCpp GetCpp # define PyActionGroup_ToCpp GetCpp # define PyCache_ToCpp GetCpp # define PyCacheFile_ToCpp GetCpp @@ -235,10 +240,11 @@ inline PyObject *FromCppOwned(PyTypeObject *pytype, Cpp const &obj, # define PyAcquireFile_FromCpp(...) FromCppOwned(&PyAcquireFile_Type, ##__VA_ARGS__) # define PyAcquireItem_FromCpp(...) FromCppOwned(&PyAcquireItem_Type,##__VA_ARGS__) # define PyAcquireItemDesc_FromCpp(...) FromCppOwned(&PyAcquireItemDesc_Type,##__VA_ARGS__) +# define PyAcquireWorker_FromCpp(...) FromCppOwned(&PyAcquireWorker_Type,##__VA_ARGS__) # define PyActionGroup_FromCpp(...) FromCppOwned(&PyActionGroup_Type,##__VA_ARGS__) # define PyCache_FromCpp(...) FromCppOwned(&PyCache_Type,##__VA_ARGS__) # define PyCacheFile_FromCpp(...) FromCpp(&PyCacheFile_Type,##__VA_ARGS__) -# define PyCdrom_FromCpp(...) FromCpp(&PyCdromType,##__VA_ARGS__) +# define PyCdrom_FromCpp(...) FromCpp(&PyCdrom_Type,##__VA_ARGS__) # define PyConfiguration_FromCpp(...) FromCppOwned(&PyConfiguration_Type, ##__VA_ARGS__) # define PyDepCache_FromCpp(...) FromCppOwned(&PyDepCache_Type,##__VA_ARGS__) # define PyDependency_FromCpp(...) FromCppOwned(&PyDependency_Type,##__VA_ARGS__) @@ -252,13 +258,13 @@ inline PyObject *FromCppOwned(PyTypeObject *pytype, Cpp const &obj, # define PyPackageIndexFile_FromCpp(...) FromCppOwned(&PyPackageIndexFile_Type,##__VA_ARGS__) # define PyPackageFile_FromCpp(...) FromCppOwned(&PyPackageFile_Type,##__VA_ARGS__) //# define PyPackageList_FromCpp(...) FromCppOwned(&PyPackageList_Type,##__VA_ARGS__) -# define PyPackageManager_FromCpp(...) FromCpp(&PyPackageManagerType,##__VA_ARGS__) +# define PyPackageManager_FromCpp(...) FromCpp(&PyPackageManager_Type,##__VA_ARGS__) //# define PyPackageRecords_FromCpp(...) FromCppOwned(&PyPackageRecords_Type,##__VA_ARGS__) # define PyPolicy_FromCpp(...) FromCppOwned(&PyPolicy_Type,##__VA_ARGS__) # define PyProblemResolver_FromCpp(...) FromCppOwned(&PyProblemResolver_Type,##__VA_ARGS__) # define PySourceList_FromCpp(...) FromCpp(&PySourceList_Type,##__VA_ARGS__) //# define PySourceRecords_FromCpp(...) FromCpp(&PySourceRecords_Type,##__VA_ARGS__) -//# define PyTagFile_FromCpp(...) FromCppOwned(&PyTagFile_Type,##__VA_ARGS__) +# define PyTagFile_FromCpp(...) FromCppOwned(&PyTagFile_Type,##__VA_ARGS__) # define PyTagSection_FromCpp(...) FromCppOwned(&PyTagSection_Type,##__VA_ARGS__) # define PyVersion_FromCpp(...) FromCppOwned(&PyVersion_Type,##__VA_ARGS__) #endif -- cgit v1.2.3