diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-07-16 13:47:30 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-07-16 13:47:30 +0200 |
| commit | 6c9876724542889c6ee1542cf529b88ffa2cf456 (patch) | |
| tree | 695f0e999a42f75fd82e469936b12feb1e85ff8e /python/progress.cc | |
| parent | 732914877a2c96b954e9d998deaa6e3a56bf932f (diff) | |
| download | python-apt-6c9876724542889c6ee1542cf529b88ffa2cf456.tar.gz | |
python/progress.cc: Fix the types of the attributes.
Diffstat (limited to 'python/progress.cc')
| -rw-r--r-- | python/progress.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/python/progress.cc b/python/progress.cc index c53a2ea5..c33db502 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -205,20 +205,20 @@ void PyFetchProgress::Start() // -- Stephan PyObject *o; - o = Py_BuildValue("f", 0.0f); + o = Py_BuildValue("d", 0.0f); PyObject_SetAttrString(callbackInst, "currentCPS", o); Py_XDECREF(o); - o = Py_BuildValue("f", 0.0f); + o = Py_BuildValue("d", 0.0f); PyObject_SetAttrString(callbackInst, "currentBytes", o); Py_XDECREF(o); - o = Py_BuildValue("i", 0); + o = Py_BuildValue("k", 0); PyObject_SetAttrString(callbackInst, "currentItems", o); Py_XDECREF(o); - o = Py_BuildValue("i", 0); + o = Py_BuildValue("k", 0); PyObject_SetAttrString(callbackInst, "totalItems", o); Py_XDECREF(o); - o = Py_BuildValue("f", 0.0f); + o = Py_BuildValue("d", 0.0f); PyObject_SetAttrString(callbackInst, "totalBytes", o); Py_XDECREF(o); @@ -244,31 +244,31 @@ bool PyFetchProgress::Pulse(pkgAcquire * Owner) // set stats PyObject *o; - o = Py_BuildValue("f", CurrentCPS); + o = Py_BuildValue("d", CurrentCPS); if(PyObject_HasAttrString(callbackInst, "current_cps")) PyObject_SetAttrString(callbackInst, "current_cps", o); else PyObject_SetAttrString(callbackInst, "currentCPS", o); Py_XDECREF(o); - o = Py_BuildValue("f", CurrentBytes); + o = Py_BuildValue("d", CurrentBytes); if(PyObject_HasAttrString(callbackInst, "current_bytes")) PyObject_SetAttrString(callbackInst, "current_bytes", o); else PyObject_SetAttrString(callbackInst, "currentBytes", o); Py_XDECREF(o); - o = Py_BuildValue("i", CurrentItems); + o = Py_BuildValue("k", CurrentItems); if(PyObject_HasAttrString(callbackInst, "current_items")) PyObject_SetAttrString(callbackInst, "current_items", o); else PyObject_SetAttrString(callbackInst, "currentItems", o); Py_XDECREF(o); - o = Py_BuildValue("i", TotalItems); + o = Py_BuildValue("k", TotalItems); if(PyObject_HasAttrString(callbackInst, "total_items")) PyObject_SetAttrString(callbackInst, "total_items", o); else PyObject_SetAttrString(callbackInst, "totalItems", o); Py_XDECREF(o); - o = Py_BuildValue("f", TotalBytes); + o = Py_BuildValue("d", TotalBytes); if(PyObject_HasAttrString(callbackInst, "total_bytes")) PyObject_SetAttrString(callbackInst, "total_bytes", o); else |
