[Python-checkins] python/dist/src/Objects unicodeobject.c, 2.233, 2.234

lemburg@users.sourceforge.net lemburg at users.sourceforge.net
Thu Oct 20 00:39:06 CEST 2005


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14790
Modified Files:
	unicodeobject.c 
Log Message:
Whitespace corrections.
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.233
retrieving revision 2.234
diff -u -d -r2.233 -r2.234
--- unicodeobject.c	19 Oct 2005 22:33:31 -0000	2.233
+++ unicodeobject.c	19 Oct 2005 22:39:02 -0000	2.234
@@ -850,7 +850,7 @@
 
 #define SPECIAL(c, encodeO, encodeWS) \
 ((c) > 127 || (c) <= 0 || utf7_special[(c)] == 1 || \
-	 (encodeWS && (utf7_special[(c)] == 2)) || \
+ (encodeWS && (utf7_special[(c)] == 2)) || \
 (encodeO && (utf7_special[(c)] == 3)))
 
 #define B64(n) \
@@ -861,29 +861,29 @@
 ((c) == '+' ? 62 : (c) == '/' ? 63 : (c) >= 'a' ? \
 (c) - 71 : (c) >= 'A' ? (c) - 65 : (c) + 4 )
 
-#define ENCODE(out, ch, bits) \
- while (bits >= 6) { \
- *out++ = B64(ch >> (bits-6)); \
- bits -= 6; \
+#define ENCODE(out, ch, bits) \
+ while (bits >= 6) { \
+ *out++ = B64(ch >> (bits-6)); \
+ bits -= 6; \
 }
 
-#define DECODE(out, ch, bits, surrogate) \
- while (bits >= 16) { \
- Py_UNICODE outCh = (Py_UNICODE) ((ch >> (bits-16)) & 0xffff); \
- bits -= 16; \
-		if (surrogate) { \
+#define DECODE(out, ch, bits, surrogate) \
+ while (bits >= 16) { \
+ Py_UNICODE outCh = (Py_UNICODE) ((ch >> (bits-16)) & 0xffff); \
+ bits -= 16; \
+ if (surrogate) { \
 /* We have already generated an error for the high surrogate \
 so let's not bother seeing if the low surrogate is correct or not */ \
-			surrogate = 0; \
-		} else if (0xDC00 <= outCh && outCh <= 0xDFFF) { \
+ surrogate = 0; \
+ } else if (0xDC00 <= outCh && outCh <= 0xDFFF) { \
 /* This is a surrogate pair. Unfortunately we can't represent \
- it in a 16-bit character */ \
-			surrogate = 1; \
- errmsg = "code pairs are not supported"; \
-	 goto utf7Error; \
-		} else { \
-				*out++ = outCh; \
-		} \
+ it in a 16-bit character */ \
+ surrogate = 1; \
+ errmsg = "code pairs are not supported"; \
+ goto utf7Error; \
+ } else { \
+ *out++ = outCh; \
+ } \
 }
 
 PyObject *PyUnicode_DecodeUTF7(const char *s,


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /