1. Ronald Oussoren
  2. pyobjc

Source

pyobjc / pyobjc-core / Modules / objc / unicode-object.m

The branch 'pyobjc-2.5.x' does not exist.
Diff from to

File pyobjc-core/Modules/objc/unicode-object.m

  • Ignore whitespace
 			ascii->length = length - nr_surrogates;
 			*ucs2_cur = 0;
 		}
+#if SIZEOF_WCHAR_T == 2
+		ascii->wstr = (wchar_t*)(result->base.data.ucs4);
+		compact->wstr_length = ascii->length;
+#endif
 
 	} else { /* 4BYTE_KIND */
 		result->base.data.ucs4 = PyObject_MALLOC(sizeof(Py_UCS4) * (length + 1 - nr_surrogates));
 		}
 		*ucs4_cur = 0;
 		ascii->length = length - nr_surrogates;
+#if SIZEOF_WCHAR_T == 4
+		ascii->wstr = (wchar_t*)(result->base.data.ucs4);
+		compact->wstr_length = ascii->length;
+#endif
 	}