summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorRomain Chantereay <rchantereau@entrouvert.com>2005-02-16 19:17:56 +0000
committerRomain Chantereay <rchantereau@entrouvert.com>2005-02-16 19:17:56 +0000
commit902d682ebc576c409b2e9a435848671ab04404ca (patch)
tree642c240841615a3801f395a11c49cde574d96414 /python
parent728dddce1bacd0c8708dd00b5f3bbe7d3e9c5bc9 (diff)
downloadlasso-902d682ebc576c409b2e9a435848671ab04404ca.tar.gz
lasso-902d682ebc576c409b2e9a435848671ab04404ca.tar.xz
lasso-902d682ebc576c409b2e9a435848671ab04404ca.zip
result have to be freed with g_free.
corrected a incode declaration. As regexp does not manage multiline expressions, the comment is replaced by the res integer declaration.
Diffstat (limited to 'python')
-rw-r--r--python/Makefile.am13
1 files changed, 13 insertions, 0 deletions
diff --git a/python/Makefile.am b/python/Makefile.am
index 99af098a..1bba3534 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -19,9 +19,22 @@ endif
lasso_wrap.c lasso.py: $(top_srcdir)/swig/Lasso.i $(top_srcdir)/swig/Lasso-wsf.i \
$(top_srcdir)/swig/inheritance.h
$(SWIG) -v -python -module lasso -o lasso_wrap.c $(top_srcdir)/swig/Lasso.i
+ cp lasso_wrap.c lasso_wrap.c.bak
+ sed -e 's/free(result)/g_free(result)/' \
+ < lasso_wrap.c.bak > lasso_wrap.c
+ cp lasso_wrap.c lasso_wrap.c.bak.1
+ sed -e 's/^ int res = 0;$//' \
+ < lasso_wrap.c.bak.1 > lasso_wrap.c
+ cp lasso_wrap.c lasso_wrap.c.bak.2
+ sed -e 's/\/\* if (val) \*val = PyObject_IsTrue(obj); return 1; \*\//int res = 0;/' \
+ < lasso_wrap.c.bak.2 > lasso_wrap.c
+
SWIG_OUTPUTS = lasso_wrap.c lasso.py
+clean-local:
+ -rm lasso_wrap.c.bak
+
# In distribution, swig generated files are present.
EXTRA_DIST = $(SWIG_OUTPUTS)