[nginx] svn commit: r4712 - in branches/stable-1.2: . auto src/core

mdounin at mdounin.ru mdounin at mdounin.ru
Fri Jun 29 17:32:44 UTC 2012


Author: mdounin
Date: 2012-06-29 17:32:43 +0000 (Fri, 29 Jun 2012)
New Revision: 4712
URL: http://trac.nginx.org/nginx/changeset/4712/nginx

Log:
Merge of r4639, r4640: C++ fixes.

Fixed the ngx_regex.h header file compatibility with C++.  Fixed
building --with-cpp_test_module on some systems.


Modified:
   branches/stable-1.2/
   branches/stable-1.2/auto/modules
   branches/stable-1.2/src/core/ngx_regex.c
   branches/stable-1.2/src/core/ngx_regex.h

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2	2012-06-29 17:28:41 UTC (rev 4711)
+++ branches/stable-1.2	2012-06-29 17:32:43 UTC (rev 4712)

Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4638,4641,4645,4674-4676
+/trunk:4611-4632,4636-4641,4645,4674-4676
\ No newline at end of property
Modified: branches/stable-1.2/auto/modules
===================================================================
--- branches/stable-1.2/auto/modules	2012-06-29 17:28:41 UTC (rev 4711)
+++ branches/stable-1.2/auto/modules	2012-06-29 17:32:43 UTC (rev 4712)
@@ -458,6 +458,7 @@
 
 if [ $NGX_CPP_TEST = YES ]; then
     NGX_MISC_SRCS="$NGX_MISC_SRCS $NGX_CPP_TEST_SRCS"
+    CORE_LIBS="$CORE_LIBS -lstdc++"
 fi
 
 

Modified: branches/stable-1.2/src/core/ngx_regex.c
===================================================================
--- branches/stable-1.2/src/core/ngx_regex.c	2012-06-29 17:28:41 UTC (rev 4711)
+++ branches/stable-1.2/src/core/ngx_regex.c	2012-06-29 17:32:43 UTC (rev 4712)
@@ -152,7 +152,7 @@
         return NGX_ERROR;
     }
 
-    rc->regex->pcre = re;
+    rc->regex->code = re;
 
     /* do not study at runtime */
 
@@ -367,7 +367,7 @@
             i = 0;
         }
 
-        elts[i].regex->extra = pcre_study(elts[i].regex->pcre, opt, &errstr);
+        elts[i].regex->extra = pcre_study(elts[i].regex->code, opt, &errstr);
 
         if (errstr != NULL) {
             ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
@@ -380,7 +380,7 @@
             int jit, n;
 
             jit = 0;
-            n = pcre_fullinfo(elts[i].regex->pcre, elts[i].regex->extra,
+            n = pcre_fullinfo(elts[i].regex->code, elts[i].regex->extra,
                               PCRE_INFO_JIT, &jit);
 
             if (n != 0 || jit != 1) {

Modified: branches/stable-1.2/src/core/ngx_regex.h
===================================================================
--- branches/stable-1.2/src/core/ngx_regex.h	2012-06-29 17:28:41 UTC (rev 4711)
+++ branches/stable-1.2/src/core/ngx_regex.h	2012-06-29 17:32:43 UTC (rev 4712)
@@ -21,7 +21,7 @@
 
 
 typedef struct {
-    pcre        *pcre;
+    pcre        *code;
     pcre_extra  *extra;
 } ngx_regex_t;
 
@@ -50,7 +50,7 @@
 ngx_int_t ngx_regex_compile(ngx_regex_compile_t *rc);
 
 #define ngx_regex_exec(re, s, captures, size)                                \
-    pcre_exec(re->pcre, re->extra, (const char *) (s)->data, (s)->len, 0, 0, \
+    pcre_exec(re->code, re->extra, (const char *) (s)->data, (s)->len, 0, 0, \
               captures, size)
 #define ngx_regex_exec_n      "pcre_exec()"
 



More information about the nginx-devel mailing list