[Python-checkins] python/dist/src/Python mactoolboxglue.c, 1.22, 1.23

jackjansen at users.sourceforge.net jackjansen at users.sourceforge.net
Thu Jul 15 15:31:41 CEST 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1637/Python

Modified Files:
	mactoolboxglue.c 
Log Message:
Moved PyMac_GetScript() to _localemodule, which is the only place where
it is used, and made it private. Should fix #978662.


Index: mactoolboxglue.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/mactoolboxglue.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** mactoolboxglue.c	19 Nov 2003 16:34:03 -0000	1.22
--- mactoolboxglue.c	15 Jul 2004 13:31:39 -0000	1.23
***************
*** 28,55 ****
  
  
- /*
- ** Find out what the current script is.
- ** Donated by Fredrik Lund.
- */
- char *PyMac_getscript()
- {
-     CFStringEncoding enc = CFStringGetSystemEncoding();
-     static CFStringRef name = NULL;
-     /* Return the code name for the encodings for which we have codecs. */
-     switch(enc) {
-     case kCFStringEncodingMacRoman: return "mac-roman";
-     case kCFStringEncodingMacGreek: return "mac-greek";
-     case kCFStringEncodingMacCyrillic: return "mac-cyrillic";
-     case kCFStringEncodingMacTurkish: return "mac-turkish";
-     case kCFStringEncodingMacIcelandic: return "mac-icelandic";
-     /* XXX which one is mac-latin2? */
-     }
-     if (!name) {
-         /* This leaks a an object. */
-         name = CFStringConvertEncodingToIANACharSetName(enc);
-     }
-     return (char *)CFStringGetCStringPtr(name, 0); 
- }
- 
  /* Like strerror() but for Mac OS error numbers */
  char *PyMac_StrError(int err)
--- 28,31 ----



More information about the Python-checkins mailing list