[PyObjC-svn] r2596 - in branches/pyobjc-2.3.x: . pyobjc-core/Modules/objc pyobjc-core/libxml2-src

[email protected] Tue, 05 Oct 2010 07:13:19 -0500
Newsgroups gmane.comp.python.pyobjc.cvs
Message-ID <[email protected]>
Author: ronaldoussoren
Date: Tue Oct  5 07:13:19 2010
New Revision: 2596

Log:
Merged revisions 2594 via svnmerge from 
https://svn.red-bean.com/pyobjc/trunk/pyobjc

........
  r2594 | ronaldoussoren | 2010-09-28 09:20:06 +0200 (Tue, 28 Sep 2010) | 5 lines
  
  Fix for issue #3077003 on SF.net: calculating the Cocoa string encoding
  from the Python one used strcmp in a bad way.
  
  Issue reported by Ken Thomases
........


Modified:
   branches/pyobjc-2.3.x/   (props changed)
   branches/pyobjc-2.3.x/pyobjc-core/Modules/objc/OC_PythonString.m
   branches/pyobjc-2.3.x/pyobjc-core/libxml2-src/Makefile.in

Modified: branches/pyobjc-2.3.x/pyobjc-core/Modules/objc/OC_PythonString.m
==============================================================================
--- branches/pyobjc-2.3.x/pyobjc-core/Modules/objc/OC_PythonString.m	(original)
+++ branches/pyobjc-2.3.x/pyobjc-core/Modules/objc/OC_PythonString.m	Tue Oct  5 07:13:19 2010
@@ -71,13 +71,13 @@
 		 */
 		NSStringEncoding encoding = [NSString defaultCStringEncoding];
 		const char* pycoding = PyUnicode_GetDefaultEncoding();
-		if (strcmp(pycoding, "ascii")) {
+		if (strcmp(pycoding, "ascii") == 0) {
 			encoding = NSASCIIStringEncoding;
-		} else if (strcmp(pycoding, "utf-8")) {
+		} else if (strcmp(pycoding, "utf-8") == 0) {
 			encoding = NSUTF8StringEncoding;
-		} else if (strcmp(pycoding, "latin1")) {
+		} else if (strcmp(pycoding, "latin1") == 0) {
 			encoding = NSISOLatin1StringEncoding;
-		} else if (strcmp(pycoding, "macroman")) {
+		} else if (strcmp(pycoding, "macroman") == 0) {
 			encoding = NSMacOSRomanStringEncoding;
 		} else {
 			/* A very non-standard system encoding, use

Modified: branches/pyobjc-2.3.x/pyobjc-core/libxml2-src/Makefile.in
==============================================================================
--- branches/pyobjc-2.3.x/pyobjc-core/libxml2-src/Makefile.in	(original)
+++ branches/pyobjc-2.3.x/pyobjc-core/libxml2-src/Makefile.in	Tue Oct  5 07:13:19 2010
@@ -679,7 +679,7 @@
 noinst_LTLIBRARIES = testdso.la
 testdso_la_SOURCES = testdso.c
 testdso_la_LDFLAGS = -module -no-undefined -avoid-version -rpath $(libdir)
-testapi_SOURCES = testapi.c
+testapi_SOURCES = $(srcdir)/testapi.c
 testapi_LDFLAGS = 
 testapi_DEPENDENCIES = $(DEPS)
 testapi_LDADD = $(LDADDS)

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb