diff options
Diffstat (limited to 'network/profanity/fix-py_xdecref-macro-usage.patch')
-rw-r--r-- | network/profanity/fix-py_xdecref-macro-usage.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/network/profanity/fix-py_xdecref-macro-usage.patch b/network/profanity/fix-py_xdecref-macro-usage.patch new file mode 100644 index 0000000000..13ee455ad6 --- /dev/null +++ b/network/profanity/fix-py_xdecref-macro-usage.patch @@ -0,0 +1,32 @@ +Fix the following build issue [1] that was introduced by [2]. + + src/plugins/python_plugins.c: In function 'python_env_init': + src/plugins/python_plugins.c:98:91: error: 'Py_XDECREF' undeclared + (first use in this function); did you mean 'Py_DecRef'? + +[1] +https://github.com/profanity-im/profanity/issues/2043 + +[2] +https://github.com/profanity-im/profanity/commit/c0da36c4 + +--- a/src/plugins/python_plugins.c 2025-07-31 15:18:09 ++++ b/src/plugins/python_plugins.c 2025-07-31 15:18:17 +@@ -86,10 +86,16 @@ python_get_version_number(void) + return version_number; + } + ++static void ++_unref_module(PyObject* module) ++{ ++ Py_XDECREF(module); ++} ++ + void + python_env_init(void) + { +- loaded_modules = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)Py_XDECREF); ++ loaded_modules = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)_unref_module); + + python_init_prof(); + |