From 59902bad90ed9192ad9b2def78f588cdefe1080c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 9 Mar 2005 16:16:37 +0000 Subject: * Implemented OpProgress support --- python/cache.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'python/cache.cc') diff --git a/python/cache.cc b/python/cache.cc index ceffba20..7ba53fd9 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -744,15 +744,13 @@ PyObject *TmpGetCache(PyObject *Self,PyObject *Args) { pkgCacheFile *Cache = new pkgCacheFile(); - PyObject *pyCallbackObj = 0; - PyObject *pyCallbackArgs = 0; - if (PyArg_ParseTuple(Args, "|OO", &pyCallbackObj, &pyCallbackArgs) == 0) + PyObject *pyCallbackInst = 0; + if (PyArg_ParseTuple(Args, "|O", &pyCallbackInst) == 0) return 0; - if(pyCallbackObj != 0) { - PyOpProgressStruct progress; - progress.py_update_callback_func = pyCallbackObj; - progress.py_update_callback_args = pyCallbackArgs; + if(pyCallbackInst != 0) { + PyOpProgress progress; + progress.setCallbackInst(pyCallbackInst); if (Cache->Open(progress,false) == false) return HandleErrors(); } else { -- cgit v1.2.3