[Python-checkins]
python/dist/src/Modules _sre.c, 2.103, 2.104 sre.h, 2.23, 2.24
niemeyer at users.sourceforge.net
niemeyer at users.sourceforge.net
Fri Feb 13 19:31:16 EST 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15738/Modules
Modified Files:
_sre.c sre.h
Log Message:
- Fixing annoying warnings.
Index: _sre.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v
retrieving revision 2.103
retrieving revision 2.104
diff -C2 -d -r2.103 -r2.104
*** _sre.c 13 Dec 2003 20:32:08 -0000 2.103
--- _sre.c 14 Feb 2004 00:31:13 -0000 2.104
***************
*** 147,164 ****
static unsigned int sre_lower(unsigned int ch)
{
! return ((ch) < 128 ? sre_char_lower[ch] : ch);
}
/* locale-specific character predicates */
!
! #define SRE_LOC_IS_DIGIT(ch) ((ch) < 256 ? isdigit((ch)) : 0)
! #define SRE_LOC_IS_SPACE(ch) ((ch) < 256 ? isspace((ch)) : 0)
#define SRE_LOC_IS_LINEBREAK(ch) ((ch) == '\n')
! #define SRE_LOC_IS_ALNUM(ch) ((ch) < 256 ? isalnum((ch)) : 0)
#define SRE_LOC_IS_WORD(ch) (SRE_LOC_IS_ALNUM((ch)) || (ch) == '_')
static unsigned int sre_lower_locale(unsigned int ch)
{
! return ((ch) < 256 ? tolower((ch)) : ch);
}
--- 147,165 ----
static unsigned int sre_lower(unsigned int ch)
{
! return ((ch) < 128 ? (unsigned int)sre_char_lower[ch] : ch);
}
/* locale-specific character predicates */
! /* !(c & ~N) == (c < N+1) for any unsigned c, this avoids
! * warnings when c's type supports only numbers < N+1 */
! #define SRE_LOC_IS_DIGIT(ch) (!((ch) & ~255) ? isdigit((ch)) : 0)
! #define SRE_LOC_IS_SPACE(ch) (!((ch) & ~255) ? isspace((ch)) : 0)
#define SRE_LOC_IS_LINEBREAK(ch) ((ch) == '\n')
! #define SRE_LOC_IS_ALNUM(ch) (!((ch) & ~255) ? isalnum((ch)) : 0)
#define SRE_LOC_IS_WORD(ch) (SRE_LOC_IS_ALNUM((ch)) || (ch) == '_')
static unsigned int sre_lower_locale(unsigned int ch)
{
! return ((ch) < 256 ? (unsigned int)tolower((ch)) : ch);
}
***************
*** 485,489 ****
}
else {
! if (ch < 65536)
block = ((unsigned char*)set)[ch >> 8];
else
--- 486,492 ----
}
else {
! /* !(c & ~N) == (c < N+1) for any unsigned c, this avoids
! * warnings when c's type supports only numbers < N+1 */
! if (!(ch & ~65535))
block = ((unsigned char*)set)[ch >> 8];
else
Index: sre.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/sre.h,v
retrieving revision 2.23
retrieving revision 2.24
diff -C2 -d -r2.23 -r2.24
*** sre.h 17 Oct 2003 22:13:16 -0000 2.23
--- sre.h 14 Feb 2004 00:31:13 -0000 2.24
***************
*** 77,82 ****
/* dynamically allocated stuff */
char* data_stack;
! int data_stack_size;
! int data_stack_base;
/* current repeat context */
SRE_REPEAT *repeat;
--- 77,82 ----
/* dynamically allocated stuff */
char* data_stack;
! unsigned int data_stack_size;
! unsigned int data_stack_base;
/* current repeat context */
SRE_REPEAT *repeat;
More information about the Python-checkins
mailing list