]> granicus.if.org Git - python/commitdiff
stop messing around with goto and just write the macro correctly.
authorGreg Stein <gstein@lyra.org>
Sun, 16 Jul 2000 21:39:49 +0000 (21:39 +0000)
committerGreg Stein <gstein@lyra.org>
Sun, 16 Jul 2000 21:39:49 +0000 (21:39 +0000)
Objects/unicodeobject.c

index 3542879bc5fbd12f04475f04d1cd54479953da0a..832312837a82f222eccf5a9e166a73fba9ba1423 100644 (file)
@@ -631,11 +631,12 @@ int utf8_decoding_error(const char **source,
     }
 }
 
-#define UTF8_ERROR(details)  do {                       \
-    if (utf8_decoding_error(&s, &p, errors, details))   \
-        goto onError;                                   \
-    goto nextChar;                                      \
-} while (0)
+#define UTF8_ERROR(details) \
+  if (1) {                                                  \
+      if (utf8_decoding_error(&s, &p, errors, (details)))   \
+          goto onError;                                     \
+      continue;                                             \
+  } else
 
 PyObject *PyUnicode_DecodeUTF8(const char *s,
                               int size,
@@ -731,8 +732,6 @@ PyObject *PyUnicode_DecodeUTF8(const char *s,
             UTF8_ERROR("unsupported Unicode code range");
         }
         s += n;
-nextChar:
-       /* empty */;
     }
 
     /* Adjust length */