1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

python: fix crash when loading scripts with Python 3.x (patch #8044) (thanks to isak)

This commit is contained in:
Sebastien Helleu
2013-05-07 08:56:12 +02:00
parent 9f08029361
commit c6fdeaf7e5
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.4.1-rc1, 2013-05-06
v0.4.1-rc1, 2013-05-07
This document lists all changes for each version.
@@ -90,6 +90,7 @@ Version 0.4.1 (under dev!)
* lua: fix crash on stack overflow: call lua_pop() for values returned by lua
functions (bug #38510)
* perl: simplify code to load scripts
* python: fix crash when loading scripts with Python 3.x (patch #8044)
* relay: rename compression "gzip" to "zlib" (compression is zlib, not gzip)
* relay: add message "_nicklist_diff" (differences between old and current
nicklist)
+1 -1
View File
@@ -618,7 +618,7 @@ weechat_python_load (const char *filename)
python_current_interpreter = Py_NewInterpreter ();
#if PY_MAJOR_VERSION >= 3
/* python >= 3.x */
len = strlen (argv[0]);
len = mbstowcs (NULL, argv[0], 0) + 1;
wargv[0] = malloc ((len + 1) * sizeof (wargv[0][0]));
if (wargv[0])
{