]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wince: try to save up a bit on memory usage.
authorGildas Bazin <gbazin@videolan.org>
Thu, 3 Mar 2005 08:34:15 +0000 (08:34 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 3 Mar 2005 08:34:15 +0000 (08:34 +0000)
modules/gui/wince/wince.cpp
modules/gui/wince/wince.h

index 396b0bec8903a8d1637e48a6c4d8effd78992213..730bb777983fd5bf9edc1bc493b8d10fd19db9a6 100644 (file)
@@ -74,6 +74,10 @@ DllMain( HANDLE hModule, DWORD fdwReason, LPVOID lpReserved )
 }
 #endif
 
+/* Global variables used by _TOMB() / _FROMB() */
+wchar_t pwsz_mbtow_wince[2048];
+char psz_wtomb_wince[2048];
+
 /*****************************************************************************
  * Open: initialize interface
  *****************************************************************************/
index f30a2d6319b70c1e0896969114275c812564fcaf..17a290345ff06c49f003ef3fc9ecbe64b2040e35 100644 (file)
@@ -503,19 +503,19 @@ protected:
  * A small helper function for utf8 <-> unicode conversions
  *****************************************************************************/
 #ifdef UNICODE
-    static wchar_t pwsz_mbtow[2048];
-    static char psz_wtomb[2048];
+    extern wchar_t pwsz_mbtow_wince[2048];
+    extern char psz_wtomb_wince[2048];
     static inline wchar_t *_FROMMB( const char *psz_in )
     {
-        mbstowcs( pwsz_mbtow, psz_in, 2048 );
-        pwsz_mbtow[2048-1] = 0;
-        return pwsz_mbtow;
+        mbstowcs( pwsz_mbtow_wince, psz_in, 2048 );
+        pwsz_mbtow_wince[2048-1] = 0;
+        return pwsz_mbtow_wince;
     }
     static inline char *_TOMB( const wchar_t *pwsz_in )
     {
-        wcstombs( psz_wtomb, pwsz_in, 2048 );
-        psz_wtomb[2048-1] = 0;
-        return psz_wtomb;
+        wcstombs( psz_wtomb_wince, pwsz_in, 2048 );
+        psz_wtomb_wince[2048-1] = 0;
+        return psz_wtomb_wince;
     }
 #else
 #   define _FROMMB(a) a