summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-18 20:42:33 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-18 20:42:33 +0200
commit1cfbc7298525656701f32224e1ed42a3e835835a (patch)
tree1c56f8fd2a4a872e6fc4ad23e0b69cac81248234 /src/modules
parentfc3c50063f659584b2145addab8236a479a031b7 (diff)
downloadmad-1cfbc7298525656701f32224e1ed42a3e835835a.tar
mad-1cfbc7298525656701f32224e1ed42a3e835835a.zip
Von libpcrecpp auf boost-regex migriert
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/Makefile.am2
-rw-r--r--src/modules/Makefile.in6
-rw-r--r--src/modules/UserBackendMysql.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am
index 93b54b3..eb95034 100644
--- a/src/modules/Makefile.am
+++ b/src/modules/Makefile.am
@@ -31,7 +31,7 @@ SystemBackendProc_la_SOURCES = SystemBackendProc.cpp
SystemBackendProc_la_LDFLAGS = $(static_ldflags) -export-symbols-regex '^SystemBackendProc_LTX_'
UserBackendMysql_la_SOURCES = UserBackendMysql.cpp
-UserBackendMysql_la_LIBADD = $(MYSQL_LDFLAGS) $(pcrecpp_LIBS)
+UserBackendMysql_la_LIBADD = $(MYSQL_LDFLAGS) $(BOOST_REGEX_LIB)
UserBackendMysql_la_LDFLAGS = $(default_ldflags) -export-symbols-regex '^UserBackendMysql_LTX_'
noinst_HEADERS = FileLogger.h SystemBackendPosix.h SystemBackendProc.h UserBackendMysql.h
diff --git a/src/modules/Makefile.in b/src/modules/Makefile.in
index 8dc9810..174cfc0 100644
--- a/src/modules/Makefile.in
+++ b/src/modules/Makefile.in
@@ -42,6 +42,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
$(top_srcdir)/m4/ax_boost_base.m4 \
+ $(top_srcdir)/m4/ax_boost_regex.m4 \
$(top_srcdir)/m4/ax_boost_signals.m4 \
$(top_srcdir)/m4/ax_boost_thread.m4 \
$(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -124,6 +125,7 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
BOOST_LDFLAGS = @BOOST_LDFLAGS@
+BOOST_REGEX_LIB = @BOOST_REGEX_LIB@
BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@
BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
CC = @CC@
@@ -248,8 +250,6 @@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
-pcrecpp_CFLAGS = @pcrecpp_CFLAGS@
-pcrecpp_LIBS = @pcrecpp_LIBS@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -277,7 +277,7 @@ SystemBackendPosix_la_LDFLAGS = $(static_ldflags) -export-symbols-regex '^System
SystemBackendProc_la_SOURCES = SystemBackendProc.cpp
SystemBackendProc_la_LDFLAGS = $(static_ldflags) -export-symbols-regex '^SystemBackendProc_LTX_'
UserBackendMysql_la_SOURCES = UserBackendMysql.cpp
-UserBackendMysql_la_LIBADD = $(MYSQL_LDFLAGS) $(pcrecpp_LIBS)
+UserBackendMysql_la_LIBADD = $(MYSQL_LDFLAGS) $(BOOST_REGEX_LIB)
UserBackendMysql_la_LDFLAGS = $(default_ldflags) -export-symbols-regex '^UserBackendMysql_LTX_'
noinst_HEADERS = FileLogger.h SystemBackendPosix.h SystemBackendProc.h UserBackendMysql.h
all: all-am
diff --git a/src/modules/UserBackendMysql.cpp b/src/modules/UserBackendMysql.cpp
index da5126a..af25f5b 100644
--- a/src/modules/UserBackendMysql.cpp
+++ b/src/modules/UserBackendMysql.cpp
@@ -28,7 +28,7 @@
#include <sstream>
#include <boost/bind.hpp>
-#include <pcrecpp.h>
+#include <boost/regex.hpp>
#define init UserBackendMysql_LTX_init
#define deinit UserBackendMysql_LTX_deinit
@@ -170,7 +170,7 @@ bool UserBackendMysql::getUserInfo(unsigned long uid, const boost::function1<voi
tmp << uid;
tmp << '"';
- pcrecpp::RE("\\{ID\\}").GlobalReplace(tmp.str(), &query);
+ query = boost::regex_replace(query, boost::regex("\\{ID\\}"), tmp.str(), boost::match_default);
mysql_real_query(mysql, query.c_str(), query.length());
MYSQL_RES *result = mysql_use_result(mysql);