[Python-checkins] r59833 - python/trunk/Parser/tokenizer.c python/trunk/Parser/tokenizer.h
georg.brandl
python-checkins at python.org
Mon Jan 7 19:41:34 CET 2008
Author: georg.brandl
Date: Mon Jan 7 19:41:34 2008
New Revision: 59833
Modified:
python/trunk/Parser/tokenizer.c
python/trunk/Parser/tokenizer.h
Log:
Fix #define ordering.
Modified: python/trunk/Parser/tokenizer.c
==============================================================================
--- python/trunk/Parser/tokenizer.c (original)
+++ python/trunk/Parser/tokenizer.c Mon Jan 7 19:41:34 2008
@@ -1533,7 +1533,6 @@
return result;
}
-#ifdef Py_USING_UNICODE
/* This function is only called from parsetok. However, it cannot live
there, as it must be empty for PGEN, and we can check for PGEN only
in this file. */
@@ -1545,6 +1544,7 @@
return NULL;
}
#else
+#ifdef Py_USING_UNICODE
static PyObject *
dec_utf8(const char *enc, const char *text, size_t len) {
PyObject *ret = NULL;
@@ -1592,10 +1592,9 @@
return text;
}
+#endif /* defined(Py_USING_UNICODE) */
#endif
-#endif /* defined(Py_USING_UNICODE) */
-
#ifdef Py_DEBUG
Modified: python/trunk/Parser/tokenizer.h
==============================================================================
--- python/trunk/Parser/tokenizer.h (original)
+++ python/trunk/Parser/tokenizer.h Mon Jan 7 19:41:34 2008
@@ -58,7 +58,7 @@
extern struct tok_state *PyTokenizer_FromFile(FILE *, char *, char *);
extern void PyTokenizer_Free(struct tok_state *);
extern int PyTokenizer_Get(struct tok_state *, char **, char **);
-#ifdef Py_USING_UNICODE
+#if defined(PGEN) || defined(Py_USING_UNICODE)
extern char * PyTokenizer_RestoreEncoding(struct tok_state* tok,
int len, int *offset);
#endif
More information about the Python-checkins
mailing list