diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-04-05 20:41:37 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-04-05 20:41:37 (GMT) |
commit | 790465fd90e8a72590386465f518db9e67ab843f (patch) | |
tree | 62e3e47f6f97120dfdfc94a87dc1a06414d95a13 /Include | |
parent | b9279bc88f867d9d3b6606502a678b137329b54d (diff) | |
download | cpython-790465fd90e8a72590386465f518db9e67ab843f.zip cpython-790465fd90e8a72590386465f518db9e67ab843f.tar.gz cpython-790465fd90e8a72590386465f518db9e67ab843f.tar.bz2 |
Change command line processing API to use wchar_t.
Fixes #2128.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/osdefs.h | 14 | ||||
-rw-r--r-- | Include/pygetopt.h | 4 | ||||
-rw-r--r-- | Include/pythonrun.h | 18 | ||||
-rw-r--r-- | Include/sysmodule.h | 6 |
4 files changed, 21 insertions, 21 deletions
diff --git a/Include/osdefs.h b/Include/osdefs.h index d0305e9..90b430a 100644 --- a/Include/osdefs.h +++ b/Include/osdefs.h @@ -12,20 +12,20 @@ extern "C" { #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2) #if defined(PYOS_OS2) && defined(PYCC_GCC) #define MAXPATHLEN 260 -#define SEP '/' -#define ALTSEP '\\' +#define SEP L'/' +#define ALTSEP L'\\' #else -#define SEP '\\' -#define ALTSEP '/' +#define SEP L'\\' +#define ALTSEP L'/' #define MAXPATHLEN 256 #endif -#define DELIM ';' +#define DELIM L';' #endif #endif /* Filename separator */ #ifndef SEP -#define SEP '/' +#define SEP L'/' #endif /* Max pathname length */ @@ -39,7 +39,7 @@ extern "C" { /* Search path entry delimiter */ #ifndef DELIM -#define DELIM ':' +#define DELIM L':' #endif #ifdef __cplusplus diff --git a/Include/pygetopt.h b/Include/pygetopt.h index 80908be..19e3fd1 100644 --- a/Include/pygetopt.h +++ b/Include/pygetopt.h @@ -7,9 +7,9 @@ extern "C" { PyAPI_DATA(int) _PyOS_opterr; PyAPI_DATA(int) _PyOS_optind; -PyAPI_DATA(char *) _PyOS_optarg; +PyAPI_DATA(wchar_t *) _PyOS_optarg; -PyAPI_FUNC(int) _PyOS_GetOpt(int argc, char **argv, char *optstring); +PyAPI_FUNC(int) _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring); #ifdef __cplusplus } diff --git a/Include/pythonrun.h b/Include/pythonrun.h index 510fd76..e5baf94 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -17,11 +17,11 @@ typedef struct { int cf_flags; /* bitmask of CO_xxx flags relevant to future */ } PyCompilerFlags; -PyAPI_FUNC(void) Py_SetProgramName(char *); -PyAPI_FUNC(char *) Py_GetProgramName(void); +PyAPI_FUNC(void) Py_SetProgramName(wchar_t *); +PyAPI_FUNC(wchar_t *) Py_GetProgramName(void); -PyAPI_FUNC(void) Py_SetPythonHome(char *); -PyAPI_FUNC(char *) Py_GetPythonHome(void); +PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *); +PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void); PyAPI_FUNC(void) Py_Initialize(void); PyAPI_FUNC(void) Py_InitializeEx(int); @@ -81,7 +81,7 @@ PyAPI_FUNC(void) Py_Exit(int); PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *); /* Bootstrap */ -PyAPI_FUNC(int) Py_Main(int argc, char **argv); +PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv); /* Use macros for a bunch of old variants */ #define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL) @@ -103,10 +103,10 @@ PyAPI_FUNC(int) Py_Main(int argc, char **argv); PyRun_FileExFlags(fp, p, s, g, l, 0, flags) /* In getpath.c */ -PyAPI_FUNC(char *) Py_GetProgramFullPath(void); -PyAPI_FUNC(char *) Py_GetPrefix(void); -PyAPI_FUNC(char *) Py_GetExecPrefix(void); -PyAPI_FUNC(char *) Py_GetPath(void); +PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void); +PyAPI_FUNC(wchar_t *) Py_GetPrefix(void); +PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void); +PyAPI_FUNC(wchar_t *) Py_GetPath(void); /* In their own files */ PyAPI_FUNC(const char *) Py_GetVersion(void); diff --git a/Include/sysmodule.h b/Include/sysmodule.h index 8ea7eb1..9ba39df 100644 --- a/Include/sysmodule.h +++ b/Include/sysmodule.h @@ -9,8 +9,8 @@ extern "C" { PyAPI_FUNC(PyObject *) PySys_GetObject(const char *); PyAPI_FUNC(int) PySys_SetObject(const char *, PyObject *); -PyAPI_FUNC(void) PySys_SetArgv(int, char **); -PyAPI_FUNC(void) PySys_SetPath(const char *); +PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **); +PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) Py_GCC_ATTRIBUTE((format(printf, 1, 2))); @@ -21,7 +21,7 @@ PyAPI_DATA(PyObject *) _PySys_TraceFunc, *_PySys_ProfileFunc; PyAPI_DATA(int) _PySys_CheckInterval; PyAPI_FUNC(void) PySys_ResetWarnOptions(void); -PyAPI_FUNC(void) PySys_AddWarnOption(const char *); +PyAPI_FUNC(void) PySys_AddWarnOption(const wchar_t *); #ifdef __cplusplus } |