diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-01-27 17:45:22 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-01-27 17:45:22 +0100 |
| commit | 748f5005026e2698c7e9ff7e98f6a7799567c60e (patch) | |
| tree | 6e4666a2f3918f783896c3db7fae3e8968629e5b /python/apt_pkgmodule.h | |
| parent | d24964f86e1108f88d55a9580bbd6d2e482562dd (diff) | |
| download | python-apt-748f5005026e2698c7e9ff7e98f6a7799567c60e.tar.gz | |
Remove inline functions from the C++ API, export them instead (part 1)
Diffstat (limited to 'python/apt_pkgmodule.h')
| -rw-r--r-- | python/apt_pkgmodule.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/python/apt_pkgmodule.h b/python/apt_pkgmodule.h index ec6cf10e..a22a25f0 100644 --- a/python/apt_pkgmodule.h +++ b/python/apt_pkgmodule.h @@ -13,6 +13,7 @@ #include <Python.h> #include <apt-pkg/hashes.h> #include <apt-pkg/acquire-item.h> +#include "generic.h" // Configuration Stuff #define Configuration_Check(op) ((op)->ob_type == &PyConfiguration_Type) @@ -122,8 +123,41 @@ extern PyTypeObject PyAcquireWorker_Type; extern PyTypeObject PySystemLock_Type; extern PyTypeObject PyFileLock_Type; +// Functions to be exported in the public API. PyObject *PyAcquire_FromCpp(pkgAcquire *fetcher, bool Delete); -PyObject *PyAcquireItem_FromCpp(pkgAcquire::Item *item, bool Delete, PyObject *owner); +# define PyAcquire_ToCpp GetCpp<pkgAcquire*> +# define PyAcquireFile_ToCpp GetCpp<pkgAcqFile*> +# define PyAcquireItem_ToCpp GetCpp<pkgAcquire::Item*> +# define PyAcquireItemDesc_ToCpp GetCpp<pkgAcquire::ItemDesc*> +# define PyAcquireWorker_ToCpp GetCpp<pkgAcquire::Worker*> +# define PyActionGroup_ToCpp GetCpp<pkgDepCache::ActionGroup*> +# define PyCache_ToCpp GetCpp<pkgCache*> +# define PyCacheFile_ToCpp GetCpp<pkgCacheFile*> +# define PyCdrom_ToCpp GetCpp<pkgCdrom> +# define PyConfiguration_ToCpp GetCpp<Configuration*> +# define PyDepCache_ToCpp GetCpp<pkgDepCache*> +# define PyDependency_ToCpp GetCpp<pkgCache::DepIterator> +# define PyDependencyList_ToCpp GetCpp<RDepListStruct> // TODO +# define PyDescription_ToCpp GetCpp<pkgCache::DescIterator> +# define PyHashes_ToCpp GetCpp<Hashes> +# define PyHashString_ToCpp GetCpp<HashString*> +# define PyIndexRecords_ToCpp GetCpp<indexRecords*> +# define PyMetaIndex_ToCpp GetCpp<metaIndex*> +# define PyPackage_ToCpp GetCpp<pkgCache::PkgIterator> +# define PyPackageFile_ToCpp GetCpp<pkgCache::PkgFileIterator> +# define PyIndexFile_ToCpp GetCpp<pkgIndexFile*> +# define PyPackageList_ToCpp GetCpp<PkgListStruct> // TODO +# define PyPackageManager_ToCpp GetCpp<pkgPackageManager*> +# define PyPackageRecords_ToCpp GetCpp<PkgRecordsStruct> // TODO +# define PyPolicy_ToCpp GetCpp<pkgPolicy*> +# define PyProblemResolver_ToCpp GetCpp<pkgProblemResolver*> +# define PySourceList_ToCpp GetCpp<pkgSourceList*> +# define PySourceRecords_ToCpp GetCpp<PkgSrcRecordsStruct> // TODO +# define PyTagFile_ToCpp GetCpp<pkgTagFile> +# define PyTagSection_ToCpp GetCpp<pkgTagSection> +# define PyVersion_ToCpp GetCpp<pkgCache::VerIterator> + + #include "python-apt.h" #endif |
