[mapserver-commits] r9154 - in trunk/mapserver: . mapscript/php3
svn at osgeo.org
svn at osgeo.org
Wed Jul 8 14:40:27 EDT 2009
Author: aboudreault
Date: 2009-07-08 14:40:27 -0400 (Wed, 08 Jul 2009)
New Revision: 9154
Modified:
trunk/mapserver/mapregex.c
trunk/mapserver/mapregex.h
trunk/mapserver/mapscript/php3/php_mapscript_util.h
trunk/mapserver/mapscript/php3/php_regex.c
Log:
Fixed warnings in php/mapscript
Modified: trunk/mapserver/mapregex.c
===================================================================
--- trunk/mapserver/mapregex.c 2009-07-08 14:37:28 UTC (rev 9153)
+++ trunk/mapserver/mapregex.c 2009-07-08 18:40:27 UTC (rev 9154)
@@ -52,7 +52,7 @@
#include "mapregex.h"
#include <regex.h>
-API_EXPORT(int) ms_regcomp(ms_regex_t *regex, const char *expr, int cflags)
+MS_API_EXPORT(int) ms_regcomp(ms_regex_t *regex, const char *expr, int cflags)
{
/* Must free in regfree() */
regex_t* sys_regex = (regex_t*) malloc(sizeof(regex_t));
@@ -60,12 +60,12 @@
return regcomp(sys_regex, expr, cflags);
}
-API_EXPORT(size_t) ms_regerror(int errcode, const ms_regex_t *regex, char *errbuf, size_t errbuf_size)
+MS_API_EXPORT(size_t) ms_regerror(int errcode, const ms_regex_t *regex, char *errbuf, size_t errbuf_size)
{
return regerror(errcode, (regex_t*)(regex->sys_regex), errbuf, errbuf_size);
}
-API_EXPORT(int) ms_regexec(const ms_regex_t *regex, const char *string, size_t nmatch, ms_regmatch_t pmatch[], int eflags)
+MS_API_EXPORT(int) ms_regexec(const ms_regex_t *regex, const char *string, size_t nmatch, ms_regmatch_t pmatch[], int eflags)
{
/*This next line only works because we know that regmatch_t
and ms_regmatch_t are exactly alike (POSIX STANDARD)*/
@@ -74,7 +74,7 @@
(regmatch_t*) pmatch, eflags);
}
-API_EXPORT(void) ms_regfree(ms_regex_t *regex)
+MS_API_EXPORT(void) ms_regfree(ms_regex_t *regex)
{
regfree((regex_t*)(regex->sys_regex));
free(regex->sys_regex);
Modified: trunk/mapserver/mapregex.h
===================================================================
--- trunk/mapserver/mapregex.h 2009-07-08 14:37:28 UTC (rev 9153)
+++ trunk/mapserver/mapregex.h 2009-07-08 18:40:27 UTC (rev 9154)
@@ -37,11 +37,11 @@
/* We want these to match the POSIX standard, so we need these*/
/* === regex2.h === */
#ifdef WIN32
-#define API_EXPORT(type) __declspec(dllexport) type __stdcall
+#define MS_API_EXPORT(type) __declspec(dllexport) type __stdcall
#elif defined(__GNUC__) && __GNUC__ >= 4
-#define API_EXPORT(type) __attribute__ ((visibility("default"))) type
+#define MS_API_EXPORT(type) __attribute__ ((visibility("default"))) type
#else
-#define API_EXPORT(type) type
+#define MS_API_EXPORT(type) type
#endif
typedef struct {
@@ -55,10 +55,10 @@
ms_regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
} ms_regmatch_t;
- API_EXPORT(int) ms_regcomp(ms_regex_t *, const char *, int);
- API_EXPORT(size_t) ms_regerror(int, const ms_regex_t *, char *, size_t);
- API_EXPORT(int) ms_regexec(const ms_regex_t *, const char *, size_t, ms_regmatch_t [], int);
- API_EXPORT(void) ms_regfree(ms_regex_t *);
+ MS_API_EXPORT(int) ms_regcomp(ms_regex_t *, const char *, int);
+ MS_API_EXPORT(size_t) ms_regerror(int, const ms_regex_t *, char *, size_t);
+ MS_API_EXPORT(int) ms_regexec(const ms_regex_t *, const char *, size_t, ms_regmatch_t [], int);
+ MS_API_EXPORT(void) ms_regfree(ms_regex_t *);
#ifndef BUILDING_REGEX_PROXY
Modified: trunk/mapserver/mapscript/php3/php_mapscript_util.h
===================================================================
--- trunk/mapserver/mapscript/php3/php_mapscript_util.h 2009-07-08 14:37:28 UTC (rev 9153)
+++ trunk/mapserver/mapscript/php3/php_mapscript_util.h 2009-07-08 18:40:27 UTC (rev 9154)
@@ -44,10 +44,10 @@
#define TSRMLS_CC
#endif
-/* PHP >=5.3 replaced ZVAL_DELREF by Z_DELREF */
+/* PHP >=5.3 replaced ZVAL_DELREF by Z_DELREF_P */
#if ZEND_MODULE_API_NO >= 20090626
-#define ZVAL_DELREF Z_DELREF
-#define ZVAL_ADDREF Z_ADDREF
+#define ZVAL_DELREF Z_DELREF_P
+#define ZVAL_ADDREF Z_ADDREF_P
#endif
/**********************************************************************
Modified: trunk/mapserver/mapscript/php3/php_regex.c
===================================================================
--- trunk/mapserver/mapscript/php3/php_regex.c 2009-07-08 14:37:28 UTC (rev 9153)
+++ trunk/mapserver/mapscript/php3/php_regex.c 2009-07-08 18:40:27 UTC (rev 9154)
@@ -66,7 +66,7 @@
-API_EXPORT(int) ms_regcomp(ms_regex_t *regex, const char *expr, int cflags)
+MS_API_EXPORT(int) ms_regcomp(ms_regex_t *regex, const char *expr, int cflags)
{
/* Must free in regfree() */
regex_t* sys_regex = (regex_t*) malloc(sizeof(regex_t));
@@ -74,12 +74,12 @@
return regcomp(sys_regex, expr, cflags);
}
-API_EXPORT(size_t) ms_regerror(int errcode, const ms_regex_t *regex, char *errbuf, size_t errbuf_size)
+MS_API_EXPORT(size_t) ms_regerror(int errcode, const ms_regex_t *regex, char *errbuf, size_t errbuf_size)
{
return regerror(errcode, (regex_t*)(regex->sys_regex), errbuf, errbuf_size);
}
-API_EXPORT(int) ms_regexec(const ms_regex_t *regex, const char *string, size_t nmatch, ms_regmatch_t pmatch[], int eflags)
+MS_API_EXPORT(int) ms_regexec(const ms_regex_t *regex, const char *string, size_t nmatch, ms_regmatch_t pmatch[], int eflags)
{
/*This next line only works because we know that regmatch_t
and ms_regmatch_t are exactly alike (POSIX STANDARD)*/
@@ -88,7 +88,7 @@
(regmatch_t*) pmatch, eflags);
}
-API_EXPORT(void) ms_regfree(ms_regex_t *regex)
+MS_API_EXPORT(void) ms_regfree(ms_regex_t *regex)
{
regfree((regex_t*)(regex->sys_regex));
free(regex->sys_regex);
More information about the mapserver-commits
mailing list