Kaydet (Commit) 76b30d16 authored tarafından Georg Brandl's avatar Georg Brandl

Fix #define ordering.

üst 62647653
...@@ -1533,7 +1533,6 @@ PyTokenizer_Get(struct tok_state *tok, char **p_start, char **p_end) ...@@ -1533,7 +1533,6 @@ PyTokenizer_Get(struct tok_state *tok, char **p_start, char **p_end)
return result; return result;
} }
#ifdef Py_USING_UNICODE
/* This function is only called from parsetok. However, it cannot live /* 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 there, as it must be empty for PGEN, and we can check for PGEN only
in this file. */ in this file. */
...@@ -1545,6 +1544,7 @@ PyTokenizer_RestoreEncoding(struct tok_state* tok, int len, int* offset) ...@@ -1545,6 +1544,7 @@ PyTokenizer_RestoreEncoding(struct tok_state* tok, int len, int* offset)
return NULL; return NULL;
} }
#else #else
#ifdef Py_USING_UNICODE
static PyObject * static PyObject *
dec_utf8(const char *enc, const char *text, size_t len) { dec_utf8(const char *enc, const char *text, size_t len) {
PyObject *ret = NULL; PyObject *ret = NULL;
...@@ -1592,10 +1592,9 @@ PyTokenizer_RestoreEncoding(struct tok_state* tok, int len, int *offset) ...@@ -1592,10 +1592,9 @@ PyTokenizer_RestoreEncoding(struct tok_state* tok, int len, int *offset)
return text; return text;
} }
#endif /* defined(Py_USING_UNICODE) */
#endif #endif
#endif /* defined(Py_USING_UNICODE) */
#ifdef Py_DEBUG #ifdef Py_DEBUG
......
...@@ -58,7 +58,7 @@ extern struct tok_state *PyTokenizer_FromString(const char *); ...@@ -58,7 +58,7 @@ extern struct tok_state *PyTokenizer_FromString(const char *);
extern struct tok_state *PyTokenizer_FromFile(FILE *, char *, char *); extern struct tok_state *PyTokenizer_FromFile(FILE *, char *, char *);
extern void PyTokenizer_Free(struct tok_state *); extern void PyTokenizer_Free(struct tok_state *);
extern int PyTokenizer_Get(struct tok_state *, char **, char **); 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, extern char * PyTokenizer_RestoreEncoding(struct tok_state* tok,
int len, int *offset); int len, int *offset);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment