[Pcre-svn] [905] code/trunk: fix local symbol issues in pcre…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [905] code/trunk: fix local symbol issues in pcre_printint.c
Revision: 905
          http://vcs.pcre.org/viewvc?view=rev&revision=905
Author:   zherczeg
Date:     2012-01-23 19:26:03 +0000 (Mon, 23 Jan 2012)


Log Message:
-----------
fix local symbol issues in pcre_printint.c

Modified Paths:
--------------
    code/trunk/pcre_compile.c
    code/trunk/pcre_internal.h
    code/trunk/pcre_printint.c
    code/trunk/pcre_study.c
    code/trunk/pcretest.c


Modified: code/trunk/pcre_compile.c
===================================================================
--- code/trunk/pcre_compile.c    2012-01-23 17:30:49 UTC (rev 904)
+++ code/trunk/pcre_compile.c    2012-01-23 19:26:03 UTC (rev 905)
@@ -8134,9 +8134,9 @@
   }


#ifdef COMPILE_PCRE8
-pcre_printint(re, stdout, TRUE);
+pcre_printint((pcre *)re, stdout, TRUE);
#else
-pcre16_printint(re, stdout, TRUE);
+pcre16_printint((pcre *)re, stdout, TRUE);
#endif

/* This check is done here in the debugging case so that the code that

Modified: code/trunk/pcre_internal.h
===================================================================
--- code/trunk/pcre_internal.h    2012-01-23 17:30:49 UTC (rev 904)
+++ code/trunk/pcre_internal.h    2012-01-23 19:26:03 UTC (rev 905)
@@ -2182,12 +2182,20 @@
 /* Internal function prefix */


#ifdef COMPILE_PCRE8
+#ifndef PUBL
#define PUBL(name) pcre_##name
+#endif
+#ifndef PRIV
#define PRIV(name) _pcre_##name
-#else
+#endif
+#else /* COMPILE_PCRE8 */
#ifdef COMPILE_PCRE16
+#ifndef PUBL
#define PUBL(name) pcre16_##name
+#endif
+#ifndef PRIV
#define PRIV(name) _pcre16_##name
+#endif
#else
#error Unsupported compiling mode
#endif /* COMPILE_PCRE16 */

Modified: code/trunk/pcre_printint.c
===================================================================
--- code/trunk/pcre_printint.c    2012-01-23 17:30:49 UTC (rev 904)
+++ code/trunk/pcre_printint.c    2012-01-23 19:26:03 UTC (rev 905)
@@ -55,6 +55,9 @@
 #include "config.h"
 #endif


+/* For pcretest program. */
+#define PRIV(name) name
+
/* We have to include pcre_internal.h because we need the internal info for
displaying the results of pcre_study() and we also need to know about the
internal macros, structures, and other internal data values; pcretest has
@@ -100,7 +103,7 @@
but its size is needed for a check that ensures it is the correct size for the
number of opcodes (thus catching update omissions). */

-static const pcre_uint8 OP_lengths[] = { OP_LENGTHS };
+static const pcre_uint8 OP_lengths_size[] = { OP_LENGTHS };



@@ -298,7 +301,7 @@
       case OP_TABLE_LENGTH:
       case OP_TABLE_LENGTH +
         ((sizeof(OP_names)/sizeof(const char *) == OP_TABLE_LENGTH) &&
-        (sizeof(OP_lengths) == OP_TABLE_LENGTH)):
+        (sizeof(OP_lengths_size) == OP_TABLE_LENGTH)):
       break;
 /* ========================================================================== */



Modified: code/trunk/pcre_study.c
===================================================================
--- code/trunk/pcre_study.c    2012-01-23 17:30:49 UTC (rev 904)
+++ code/trunk/pcre_study.c    2012-01-23 19:26:03 UTC (rev 905)
@@ -1451,7 +1451,7 @@
 #ifdef PCRE_DEBUG
   if (bits_set)
     {
-    pcre_uint8 *ptr = (pcre_uint32 *)start_bits;
+    pcre_uint8 *ptr = start_bits;
     int i;


     printf("Start bits:\n");


Modified: code/trunk/pcretest.c
===================================================================
--- code/trunk/pcretest.c    2012-01-23 17:30:49 UTC (rev 904)
+++ code/trunk/pcretest.c    2012-01-23 19:26:03 UTC (rev 905)
@@ -105,6 +105,7 @@
 #define OUTPUT_MODE  "wb"
 #endif


+#define PRIV(name) name

/* We have to include pcre_internal.h because we need the internal info for
displaying the results of pcre_study() and we also need to know about the
@@ -141,8 +142,6 @@
external symbols to prevent clashes. */

#define PCRE_INCLUDED
-#undef PRIV
-#define PRIV(name) name

#include "pcre_tables.c"