Bug#451631: adonthell: Fix to work with python2.5
Package: adonthell
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu hardy
The attached patch from Matthias Klose fixes the package to work with
python2.5. The latest version can also be grabbed from
http://patches.ubuntu.com/a/adonthell/extracted/04_python2.5.diff
It can be dropped in to debian/patches, and added to the end of
debian/patches/series, and it should apply cleanly.
Thanks,
James
--- ./src/py_adonthell_wrap.cc.orig 2007-01-16 17:38:05.000000000 +0100
+++ ./src/py_adonthell_wrap.cc 2007-01-16 17:39:17.000000000 +0100
@@ -1174,7 +1174,7 @@
obj = pyobj;
if (PyCFunction_Check(obj)) {
/* here we get the method pointer for callbacks */
- char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
c = doc ? strstr(doc, "swig_ptr: ") : 0;
if (c) {
c = SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name);
@@ -28592,11 +28592,11 @@
swig_type_info **types_initial) {
size_t i;
for (i = 0; methods[i].ml_name; ++i) {
- char *c = methods[i].ml_doc;
+ const char *c = methods[i].ml_doc;
if (c && (c = strstr(c, "swig_ptr: "))) {
int j;
swig_const_info *ci = 0;
- char *name = c + 10;
+ const char *name = c + 10;
for (j = 0; const_table[j].type; j++) {
if (strncmp(const_table[j].name, name,
strlen(const_table[j].name)) == 0) {
Reply to: