Although it's documented as returning a new reference, decrementing
the refcount causes a segfault. Unknown why.
---
generator/generator | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generator/generator b/generator/generator
index 02afb3a..a9f97d7 100755
--- a/generator/generator
+++ b/generator/generator
@@ -4150,7 +4150,7 @@ let print_python_binding name { args; optargs; ret; may_set_error }
=
| CBMutable (Int n) ->
pr " PyObject *py_%s_ret = PyObject_GetAttrString (py_%s,
\"value\");\n" n n;
pr " *%s = PyLong_AsLong (py_%s_ret);\n" n n;
- pr " Py_DECREF (py_%s_ret);\n" n;
+ pr " // Py_DECREF (py_%s_ret); - segfaults, why?\n" n;
pr " Py_DECREF (py_%s);\n" n
| CBBytesIn _
| CBInt _ | CBInt64 _
--
2.22.0