diff options
author | Guido van Rossum <guido@python.org> | 1998-04-28 16:08:19 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-04-28 16:08:19 (GMT) |
commit | 239a218baccafc2a27ed21beaecd42bcab70c5fd (patch) | |
tree | 959ea915af811a8219d4dd658f3234ef506b46c5 /Modules/_localemodule.c | |
parent | 9b00dfae752aa8f1e4c6d70469e50ec45fb057c3 (diff) | |
download | cpython-239a218baccafc2a27ed21beaecd42bcab70c5fd.zip cpython-239a218baccafc2a27ed21beaecd42bcab70c5fd.tar.gz cpython-239a218baccafc2a27ed21beaecd42bcab70c5fd.tar.bz2 |
Type casts, and added a strdup() declaration for the Mac.
(Jack)
Diffstat (limited to 'Modules/_localemodule.c')
-rw-r--r-- | Modules/_localemodule.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index 11b7760..69621e3 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -1,5 +1,5 @@ /*********************************************************** -Copyright (C) 1997 Martin von Löwis +Copyright (C) 1997 Martin von Loewis Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, @@ -14,6 +14,9 @@ This software comes with no warranty. Use at your own risk. #include <string.h> #include <limits.h> #include "Python.h" +#ifdef macintosh +char *strdup Py_PROTO((char *)); +#endif static char locale__doc__[]="Support for POSIX locales."; @@ -88,7 +91,7 @@ fixup_ulcase() if (isupper(c)) ul[n++] = c; } - ulo=PyString_FromStringAndSize(ul,n); + ulo=PyString_FromStringAndSize((char *)ul,n); if(!ulo)return; if(string) PyDict_SetItemString(string,"uppercase",ulo); @@ -101,7 +104,7 @@ fixup_ulcase() if (islower(c)) ul[n++] = c; } - ulo=PyString_FromStringAndSize(ul,n); + ulo=PyString_FromStringAndSize((char *)ul,n); if(!ulo)return; if(string) PyDict_SetItemString(string,"lowercase",ulo); @@ -114,7 +117,7 @@ fixup_ulcase() if (isalpha(c)) ul[n++] = c; } - ulo=PyString_FromStringAndSize(ul,n); + ulo=PyString_FromStringAndSize((char *)ul,n); if(!ulo)return; if(string) PyDict_SetItemString(string,"letters",ulo); |