fixed: XBMC python module with non-wchar_t unicode python
authoranssih <anssih@568bbfeb-2a22-0410-94d2-cc84cf5bfa90>
Mon, 19 Jul 2010 16:43:38 +0000 (16:43 +0000)
committeranssih <anssih@568bbfeb-2a22-0410-94d2-cc84cf5bfa90>
Mon, 19 Jul 2010 16:43:38 +0000 (16:43 +0000)
commitac65e8b308d6ef13670eb7acf1a4b09252221bf5
tree34401a2c6f3372bdb62922dcd6f96b33293bba3b
parentac3c788088069e0af8d426c27a9d3e1b43b1c027
fixed: XBMC python module with non-wchar_t unicode python

Python can use either UCS2 or UCS4 for its unicode type, depending on
compilation options. By default it uses UCS2.

Currently we convert between unicode<->utf8 on the assumption that
python unicode characters are the same size as wchar_t, which is 16 bits
on win32 and 32 bits on linux. This causes breakage when using external
python compiled with the default compilation options.

Fix that by using the appropriate python functions for converting
between unicode<=>utf8 instead of doing the conversion ourselves.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31980 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
xbmc/lib/libPython/XBPythonDll.cpp
xbmc/lib/libPython/XBPythonDllFuncs.S
xbmc/lib/libPython/xbmcmodule/PythonAddon.cpp
xbmc/lib/libPython/xbmcmodule/controlbutton.cpp
xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp
xbmc/lib/libPython/xbmcmodule/pyutil.cpp
xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp
xbmc/win32/WIN32XBPythonDll.cpp