summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorHouzéfa Abbasbhay <houzefa.abba@xcg-consulting.fr>2014-12-01 14:05:44 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2015-02-12 18:21:12 (GMT)
commit87efa7ee5588f5d8474ed62366118ab5c9adc5a4 (patch)
tree07b366612c9d3a3000abc6939a815b48a242cf25 /bindings
parent70b9d765bcbc20d4e570a23e0ab99efa493c4afb (diff)
downloadlasso-87efa7ee5588f5d8474ed62366118ab5c9adc5a4.zip
lasso-87efa7ee5588f5d8474ed62366118ab5c9adc5a4.tar.gz
lasso-87efa7ee5588f5d8474ed62366118ab5c9adc5a4.tar.bz2
Python 3: Disable "PyGObjectPtrType" to avoid crashes (needs
investigation)
Diffstat (limited to 'bindings')
-rw-r--r--bindings/python/wrapper_bottom.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bindings/python/wrapper_bottom.c b/bindings/python/wrapper_bottom.c
index 30971b1..9f1157a 100644
--- a/bindings/python/wrapper_bottom.c
+++ b/bindings/python/wrapper_bottom.c
@@ -21,8 +21,11 @@ MOD_INIT(_lasso)
{
PyObject *m, *d;
+#if PY_MAJOR_VERSION < 2
+ /// @todo Seg-faults on Python 3...
if (PyType_Ready(&PyGObjectPtrType) < 0)
return MOD_ERROR_VAL;
+#endif
MOD_DEF(m, "_lasso", "_lasso wrapper module", lasso_methods);
d = PyModule_GetDict(m);
@@ -30,8 +33,11 @@ MOD_INIT(_lasso)
lasso_wrapper_key = g_quark_from_static_string("PyLasso::wrapper");
+#if PY_MAJOR_VERSION < 2
+ /// @todo Seg-faults on Python 3...
Py_INCREF(&PyGObjectPtrType);
PyModule_AddObject(m, "PyGObjectPtr", (PyObject *)&PyGObjectPtrType);
+#endif
lasso_init();
lasso_log_set_handler(G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION | G_LOG_LEVEL_MASK,
lasso_python_log, NULL);