From f59f39abd4d50af3ad2845b129ed0f8ddeaf9f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 8 Jan 2023 20:26:57 +0100 Subject: [PATCH] python: remove unneded call to deprecated function PySys_SetArgv This function is deprecated since Python 3.11. --- src/plugins/python/weechat-python.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c index 1fd1d713f..96ce66a75 100644 --- a/src/plugins/python/weechat-python.c +++ b/src/plugins/python/weechat-python.c @@ -720,8 +720,6 @@ weechat_python_set_output () struct t_plugin_script * weechat_python_load (const char *filename, const char *code) { - char *argv[] = { "__weechat_plugin__" , NULL }; - wchar_t *wargv[] = { NULL, NULL }; FILE *fp; PyObject *python_path, *path, *module_main, *globals, *rc; char *weechat_sharedir, *weechat_data_dir; @@ -755,20 +753,6 @@ weechat_python_load (const char *filename, const char *code) /* PyEval_AcquireLock (); */ python_current_interpreter = Py_NewInterpreter (); - len = mbstowcs (NULL, argv[0], 0) + 1; - wargv[0] = malloc ((len + 1) * sizeof (wargv[0][0])); - if (wargv[0]) - { - if (mbstowcs (wargv[0], argv[0], len) == (size_t)(-1)) - { - free (wargv[0]); - wargv[0] = NULL; - } - PySys_SetArgv (1, wargv); - if (wargv[0]) - free (wargv[0]); - } - if (!python_current_interpreter) { weechat_printf (NULL,