summaryrefslogtreecommitdiff
path: root/src/plugins/python/weechat-python.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-01-08 20:26:57 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-01-08 20:26:57 +0100
commitf59f39abd4d50af3ad2845b129ed0f8ddeaf9f9b (patch)
treeece5fda0c846cc6bfcce08c82f29c0d7480817ff /src/plugins/python/weechat-python.c
parent9b47832a0180213cd4c17650ccefaac3f198993d (diff)
downloadweechat-f59f39abd4d50af3ad2845b129ed0f8ddeaf9f9b.zip
python: remove unneded call to deprecated function PySys_SetArgv
This function is deprecated since Python 3.11.
Diffstat (limited to 'src/plugins/python/weechat-python.c')
-rw-r--r--src/plugins/python/weechat-python.c16
1 files changed, 0 insertions, 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,