TypeError in python wrapper, caused by swig change
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
opensync |
New
|
Unknown
|
|||
opensync (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
SWIG 1.3.37 introduced, rightly or wrongly, some changes in the way python is handled. This causes a crippling TypeError in python-opensync built with later versions of swig, such as the package in 10.04 lucid. The following patch will fix this problem, it will work ok with any version but is only required in builds on lucid. Please apply, python-opensync is crippled without this.
---
Description: Fix for change in SWIG after 1.3.36
Upstream 0.2x branch is essentially unmaintained.
Forwarded: no
Author: Mark Ellis <email address hidden>
Last-Update: 2010-05-24
diff -Nurp opensync-
--- opensync-
+++ opensync-
@@ -82,7 +82,7 @@ typedef struct {} OSyncHashTable;
%extend OSyncChange {
OSyncChange(
OSyncChange *change = NULL;
- if (obj)
+ if ((obj) && (obj != Py_None))
change = (OSyncChange *)PyCObject_
else
change = osync_change_new();
Related branches
tags: | added: patch |
Changed in opensync (Ubuntu): | |
status: | New → Confirmed |
Changed in opensync: | |
status: | Unknown → New |
Changed in opensync (Ubuntu Lucid): | |
status: | New → Fix Committed |
tags: |
added: verification-done removed: verification-needed |
Hi,
I take the liberty to explain a bit further the how-to circumvent this bug with the above mentioned patch: PATCH/opensync- swig-fix- postbuild. diff
1. Download the attached document.
2. Using Lucid, type in Terminal:
cd /usr/share/pyshared
3. Finally type:
patch -Np0 -i /PATH/TO/