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:
@@ -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)
|
||||
|
||||
@@ -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])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user