[Python-bugs-list] [ python-Bugs-530285 ] redefining SRE_CODE in Modules/sre.h
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 15 Mar 2002 09:50:28 -0800
Bugs item #530285, was opened at 2002-03-15 13:44
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=530285&group_id=5470
Category: Regular Expressions
Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Fredrik Lundh (effbot)
Summary: redefining SRE_CODE in Modules/sre.h
Initial Comment:
Taken from Modules/sre.h:
/* size of a code word (must be unsigned short or
larger, and
large enough to hold a Py_UNICODE character) */
#ifdef Py_UNICODE_WIDE
#define SRE_CODE unsigned long
#else
#define SRE_CODE unsigned short
#endif
#define SRE_CODE unsigned short
------------------
SRE_CODE is always an unsigned short.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2002-03-15 18:50
Message:
Logged In: YES
user_id=21627
What do you mean with "SRE_CODE is always an unsigned
short"; if sre.h defines it as something different, it is
different.
It also needs to be different for Py_UNICODE_WIDE: For
SRE_OP_LITERAL, a Py_UNICODE is the argument. If Py_UNICODE
is 4 bytes, SRE_CODE must be also four bytes.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=530285&group_id=5470