[Pcre-svn] [1057] code/trunk: pcre32: xclass: Use pcre_uint3…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [1057] code/trunk: pcre32: xclass: Use pcre_uint32 for characters
Revision: 1057
          http://vcs.pcre.org/viewvc?view=rev&revision=1057
Author:   chpe
Date:     2012-10-16 16:53:45 +0100 (Tue, 16 Oct 2012)


Log Message:
-----------
pcre32: xclass: Use pcre_uint32 for characters

This fixes character classes for 32-bit in non-UTF-32 mode.

Modified Paths:
--------------
    code/trunk/pcre_internal.h
    code/trunk/pcre_xclass.c


Modified: code/trunk/pcre_internal.h
===================================================================
--- code/trunk/pcre_internal.h    2012-10-16 15:53:41 UTC (rev 1056)
+++ code/trunk/pcre_internal.h    2012-10-16 15:53:45 UTC (rev 1057)
@@ -2586,7 +2586,7 @@
 extern int               PRIV(valid_utf)(PCRE_PUCHAR, int, int *);
 extern BOOL              PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
                            int *, BOOL);
-extern BOOL              PRIV(xclass)(int, const pcre_uchar *, BOOL);
+extern BOOL              PRIV(xclass)(pcre_uint32, const pcre_uchar *, BOOL);


 #ifdef SUPPORT_JIT
 extern void              PRIV(jit_compile)(const REAL_PCRE *,


Modified: code/trunk/pcre_xclass.c
===================================================================
--- code/trunk/pcre_xclass.c    2012-10-16 15:53:41 UTC (rev 1056)
+++ code/trunk/pcre_xclass.c    2012-10-16 15:53:45 UTC (rev 1057)
@@ -64,9 +64,9 @@
 */


BOOL
-PRIV(xclass)(int c, const pcre_uchar *data, BOOL utf)
+PRIV(xclass)(pcre_uint32 c, const pcre_uchar *data, BOOL utf)
{
-int t;
+pcre_uchar t;
BOOL negated = (*data & XCL_NOT) != 0;

(void)utf;
@@ -94,7 +94,7 @@

 while ((t = *data++) != XCL_END)
   {
-  int x, y;
+  pcre_uint32 x, y;
   if (t == XCL_SINGLE)
     {
 #ifdef SUPPORT_UTF