Imported Upstream version 5.6.6

parent dbe87fee
MapServer Revision History
==========================
$Id: HISTORY.TXT 10353 2010-07-14 09:55:52Z dmorissette $
$Id: HISTORY.TXT 10874 2011-01-17 22:31:59Z dmorissette $
This is a human-readable revision history which will attempt to document
required changes for users to migrate from one version of MapServer to the
......@@ -11,6 +11,48 @@ the top of the list.)
For a complete change history, please see the Subversion log comments.
Version 5.6.6 (2011-01-17):
---------------------------
- SLD: Fix point symbolizer issue when color is not set (#3658)
- Fix WMS EXCEPTIONS parameter issue with fastcgi (#3525)
- Fixed missing time in msDrawMap logging (#3651)
- Fixed Internal error with Oracle Spatial multi point geometries (#3627)
- Fixed double free in shp2img.c (#3497)
- Fixed free(): invalid next size in mapfile.c (#3604)
- Fix for the memory corruption when mapping the string data type in the
Java bindings (3491)
- Correct wms 1.3.0 latlong bbox error (#2578)
- Fix ProperyIsLike not used efficiently with Oracle (#3557)
- Fixed msOGRGetSymbolId according to the changes in gdal 1.8 (#3556)
- Fixed crash when drawing a map using UNIQUE fid in the layer data (#3271)
- Fixed Oracle Spatial Data gets corrupt (#3541)
- Fixed issue with multiple styles and binding (#3538)
- Fixed multiple include tags not supported in xml mapfiles (#3530)
- Ensure the class is not marked BeforeFieldInit causing memory corruption
with C#/CLR4 (#3438)
- Fixed MSSQL2008 driver returning invalid extent (#3498)
- Fix computation of shape bounds when the first line contains no points
(#3119)(fixes #3383)
- Fixed error message tiles on zero-sized map cause memory allocation errors
in maperror.c. (#3524)
Version 5.6.5 (2010-07-14):
---------------------------
......
/******************************************************************************
* $Id: mapdraw.c 10351 2010-07-14 09:36:48Z dmorissette $
* $Id: mapdraw.c 10840 2011-01-06 21:18:11Z pramsey $
*
* Project: MapServer
* Purpose: High level msDrawMap() implementation and related functions.
......@@ -32,7 +32,7 @@
#include "maptime.h"
#include "mapcopy.h"
MS_CVSID("$Id: mapdraw.c 10351 2010-07-14 09:36:48Z dmorissette $")
MS_CVSID("$Id: mapdraw.c 10840 2011-01-06 21:18:11Z pramsey $")
/*
* Functions to reset any pen (color index) values previously set. Used primarily to reset things when
......@@ -327,6 +327,10 @@ imageObj *msDrawMap(mapObj *map, int querymap)
}
#if defined(USE_WMS_LYR) || defined(USE_WFS_LYR)
/* Time the OWS query phase */
if(map->debug >= MS_DEBUGLEVEL_TUNING ) msGettimeofday(&starttime, NULL);
/* How many OWS (WMS/WFS) layers do we have to draw?
* Note: numOWSLayers is the number of actual layers and numOWSRequests is
* the number of HTTP requests which could be lower if multiple layers
......@@ -339,6 +343,7 @@ imageObj *msDrawMap(mapObj *map, int querymap)
numOWSLayers++;
}
if (numOWSLayers > 0) {
/* Alloc and init pasOWSReqInfo...
*/
......@@ -393,6 +398,14 @@ imageObj *msDrawMap(mapObj *map, int querymap)
msFree(pasOWSReqInfo);
return NULL;
}
if(map->debug >= MS_DEBUGLEVEL_TUNING) {
msGettimeofday(&endtime, NULL);
msDebug("msDrawMap(): WMS/WFS set-up and query, %.3fs\n",
(endtime.tv_sec+endtime.tv_usec/1.0e6)-
(starttime.tv_sec+starttime.tv_usec/1.0e6) );
}
#endif /* USE_WMS_LYR || USE_WFS_LYR */
/* OK, now we can start drawing */
......@@ -1016,7 +1029,7 @@ int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image)
pStyle->outlinecolor = tmp;
}
if (i == 0 || pStyle->outlinewidth > 0) {
status = msDrawShape(map, layer, &shape, image, i, MS_TRUE); /* draw a single style */
status = msDrawShape(map, layer, &shape, image, i, MS_FALSE); /* draw a single style */
}
if (pStyle->outlinewidth > 0) {
/*
......
/******************************************************************************
* $Id: maperror.c 9453 2009-10-13 20:06:23Z aboudreault $
* $Id: maperror.c 10483 2010-08-27 04:15:34Z sdlime $
*
* Project: MapServer
* Purpose: Implementation of msSetError(), msDebug() and related functions.
......@@ -41,7 +41,7 @@
#endif
#include <stdarg.h>
MS_CVSID("$Id: maperror.c 9453 2009-10-13 20:06:23Z aboudreault $")
MS_CVSID("$Id: maperror.c 10483 2010-08-27 04:15:34Z sdlime $")
static char *ms_errorCodes[MS_NUMERRORCODES] = {"",
"Unable to access file.",
......@@ -396,7 +396,7 @@ void msWriteErrorImage(mapObj *map, char *filename, int blank) {
char *pFormatBuffer;
char cGDFormat[128];
if (map) {
if( map->width != -1 && map->height != -1 )
if( map->width > 0 && map->height > 0 )
{
width = map->width;
height = map->height;
......
......@@ -42,7 +42,7 @@
# include "gdal.h"
#endif
MS_CVSID("$Id: mapfile.c 10243 2010-06-23 17:41:14Z aboudreault $")
MS_CVSID("$Id: mapfile.c 10731 2010-11-15 18:49:36Z aboudreault $")
extern int msyylex(void);
extern void msyyrestart(FILE *);
......@@ -5485,7 +5485,7 @@ void msApplyDefaultSubstitutions(mapObj *map) {
const char *defaultkey = msFirstKeyFromHashTable(&(layer->metadata));
while(defaultkey) {
if(!strncmp(defaultkey,"default_",8)){
char *tmpstr = (char *)malloc(sizeof(char)*(strlen(defaultkey)-8));
char *tmpstr = (char *)malloc(sizeof(char)*(strlen(defaultkey)-5));
sprintf(tmpstr,"%%%s%%", &(defaultkey[8]));
msLayerSubstituteString(layer,tmpstr,msLookupHashTable(&(layer->metadata),defaultkey));
......
/******************************************************************************
* $Id: maplayer.c 10106 2010-04-20 04:19:06Z sdlime $
* $Id: maplayer.c 10533 2010-09-29 16:30:43Z aboudreault $
*
* Project: MapServer
* Purpose: Implementation of most layerObj functions.
......@@ -32,7 +32,7 @@
#include "mapogcfilter.h"
#include <assert.h>
MS_CVSID("$Id: maplayer.c 10106 2010-04-20 04:19:06Z sdlime $")
MS_CVSID("$Id: maplayer.c 10533 2010-09-29 16:30:43Z aboudreault $")
static int populateVirtualTable(layerVTableObj *vtable);
......@@ -367,6 +367,11 @@ int msLayerWhichItems(layerObj *layer, int get_all, char *metadata)
if (rv != MS_SUCCESS) return rv;
}
/* force get_all=MS_TRUE in some cases */
if(layer->connectiontype == MS_INLINE || layer->connectiontype == MS_SDE ||
(layer->connectiontype == MS_ORACLESPATIAL && layer->data && msCaseFindSubstring(layer->data, "UNIQUE")))
get_all=MS_TRUE;
/* cleanup any previous item selection */
msLayerFreeItemInfo(layer);
if(layer->items) {
......
/******************************************************************************
* $Id: mapmssql2008.c 9924 2010-03-06 22:35:16Z tamas $
* $Id: mapmssql2008.c 10395 2010-07-24 19:20:29Z tamas $
*
* Project: MapServer
* Purpose: MS SQL 2008 (Katmai) Layer Connector
......@@ -34,7 +34,7 @@
#define _CRT_SECURE_NO_WARNINGS 1
/* $Id: mapmssql2008.c 9924 2010-03-06 22:35:16Z tamas $ */
/* $Id: mapmssql2008.c 10395 2010-07-24 19:20:29Z tamas $ */
#include <assert.h>
#include "mapserver.h"
#include "maptime.h"
......@@ -49,7 +49,7 @@
#include <string.h>
#include <ctype.h> /* tolower() */
MS_CVSID("$Id: mapmssql2008.c 9924 2010-03-06 22:35:16Z tamas $")
MS_CVSID("$Id: mapmssql2008.c 10395 2010-07-24 19:20:29Z tamas $")
/* Structure for connection to an ODBC database (Microsoft preferred way to connect to SQL Server 2005 from c/c++) */
typedef struct msODBCconn_t
......@@ -1608,16 +1608,27 @@ int msMSSQL2008LayerGetItems(layerObj *layer)
return msMSSQL2008LayerInitItemInfo(layer);
}
/* Dont know if this function actually called */
/* So just return some large area for now*/
/* Get the layer extent as specified in the mapfile or a largest area */
/* covering all features */
int msMSSQL2008LayerGetExtent(layerObj *layer, rectObj *extent)
{
if(layer->debug) {
msDebug("msMSSQL2008LayerGetExtent called\n");
}
extent->minx = extent->miny = -1000000;
extent->maxx = extent->maxy = 1000000;
if (layer->extent.minx == -1.0 && layer->extent.miny == -1.0 &&
layer->extent.maxx == -1.0 && layer->extent.maxy == -1.0)
{
extent->minx = extent->miny = -1.0 * FLT_MAX;
extent->maxx = extent->maxy = FLT_MAX;
}
else
{
extent->minx = layer->extent.minx;
extent->miny = layer->extent.miny;
extent->maxx = layer->extent.maxx;
extent->maxy = layer->extent.maxy;
}
return MS_SUCCESS;
}
......
/******************************************************************************
* $Id: mapobject.c 9323 2009-09-21 06:26:37Z sdlime $
* $Id: mapobject.c 10868 2011-01-14 15:08:26Z assefa $
*
* Project: MapServer
* Purpose: Functions for operating on a mapObj that don't belong in a
......@@ -35,7 +35,7 @@
# include "cpl_conv.h"
#endif
MS_CVSID("$Id: mapobject.c 9323 2009-09-21 06:26:37Z sdlime $")
MS_CVSID("$Id: mapobject.c 10868 2011-01-14 15:08:26Z assefa $")
void freeWeb(webObj *web);
void freeScalebar(scalebarObj *scalebar);
......@@ -774,10 +774,17 @@ int msMapLoadOWSParameters(mapObj *map, cgiRequestObj *request,
{
#ifdef USE_WMS_SVR
int version;
char *wms_exception_format = NULL;
int i =0;
version = msOWSParseVersionString(wmtver);
for(i=0; i<request->NumParams; i++)
{
if (strcasecmp(request->ParamNames[i], "EXCEPTIONS") == 0)
wms_exception_format = request->ParamValues[i];
}
return msWMSLoadGetMapParams(map, version, request->ParamNames,
request->ParamValues, request->NumParams);
request->ParamValues, request->NumParams, wms_exception_format);
#else
msSetError(MS_WMSERR, "WMS server support is not available.",
"msMapLoadOWSParameters()");
......
/**********************************************************************
* $Id: mapogcfilter.c 10102 2010-04-13 14:08:11Z assefa $
* $Id: mapogcfilter.c 10549 2010-09-30 13:55:47Z assefa $
*
* Project: MapServer
* Purpose: OGC Filter Encoding implementation
......@@ -35,7 +35,7 @@
#include "mapserver.h"
#include "mapowscommon.h"
MS_CVSID("$Id: mapogcfilter.c 10102 2010-04-13 14:08:11Z assefa $")
MS_CVSID("$Id: mapogcfilter.c 10549 2010-09-30 13:55:47Z assefa $")
#ifdef USE_OGR
......@@ -2368,11 +2368,11 @@ int FLTValidForPropertyIsLikeFilter(FilterEncodingNode *psFilterNode)
if (nCount > 1)
return 0;
/*make sure that if there is properyisequal, it is the only one*/
if (psFilterNode->psLeftNode == NULL && psFilterNode->psRightNode == NULL)
/*make sure that it is the main and only node*/
if (strcasecmp(psFilterNode->pszValue, "PropertyIsLike") == 0)
return 1;
return 0;
return 0;
}
int FLTIsPropertyIsLikeFilter(FilterEncodingNode *psFilterNode)
......
/**********************************************************************
* $Id: mapogcsld.c 9912 2010-03-03 17:36:54Z assefa $
* $Id: mapogcsld.c 10870 2011-01-14 16:18:51Z assefa $
*
* Project: MapServer
* Purpose: OGC SLD implementation
......@@ -34,7 +34,7 @@
#include "cpl_string.h"
#endif
MS_CVSID("$Id: mapogcsld.c 9912 2010-03-03 17:36:54Z assefa $")
MS_CVSID("$Id: mapogcsld.c 10870 2011-01-14 16:18:51Z assefa $")
#define SLD_LINE_SYMBOL_NAME "sld_line_symbol"
#define SLD_LINE_SYMBOL_DASH_NAME "sld_line_symbol_dash"
......@@ -1648,22 +1648,22 @@ void msSLDParseGraphicFillOrStroke(CPLXMLNode *psRoot,
psCssParam = psCssParam->psNext;
}
}
}
/* set the default color if color is not not already set */
if ((psStyle->color.red < 0 ||
psStyle->color.green == -1 ||
psStyle->color.blue == -1) &&
(psStyle->outlinecolor.red == -1 ||
psStyle->outlinecolor.green == -1 ||
psStyle->outlinecolor.blue == -1))
{
psStyle->color.red = 128;
psStyle->color.green = 128;
psStyle->color.blue = 128;
}
if ((psStyle->color.red < 0 ||
psStyle->color.green == -1 ||
psStyle->color.blue == -1) &&
(psStyle->outlinecolor.red == -1 ||
psStyle->outlinecolor.green == -1 ||
psStyle->outlinecolor.blue == -1))
{
psStyle->color.red = 128;
psStyle->color.green = 128;
psStyle->color.blue = 128;
}
}
/* Get the corresponding symbol id */
psStyle->symbol = msSLDGetMarkSymbol(map, pszSymbolName,
bFilled, pszDashValue);
......
/**********************************************************************
* $Id: mapogr.cpp 9709 2010-01-18 18:55:29Z aboudreault $
* $Id: mapogr.cpp 10545 2010-09-30 11:52:36Z tamas $
*
* Project: MapServer
* Purpose: OGR Link
......@@ -40,7 +40,7 @@
# include "ogr_srs_api.h"
#endif
MS_CVSID("$Id: mapogr.cpp 9709 2010-01-18 18:55:29Z aboudreault $")
MS_CVSID("$Id: mapogr.cpp 10545 2010-09-30 11:52:36Z tamas $")
#if defined(GDAL_VERSION_NUM) && (GDAL_VERSION_NUM < 1400)
# define ACQUIRE_OLD_OGR_LOCK msAcquireLock( TLOCK_OGR )
......@@ -2719,14 +2719,21 @@ static int msOGRGetSymbolId(symbolSetObj *symbolset, const char *pszSymbolId,
int numparams;
int nSymbol = -1;
if (pszSymbolId && pszSymbolId[0] != '\0' &&
(params = msStringSplit(pszSymbolId, '.', &numparams))!=NULL)
if (pszSymbolId && pszSymbolId[0] != '\0')
{
for(int j=0; j<numparams && nSymbol == -1; j++)
#if GDAL_VERSION_NUM >= 1800 /* Use comma as the separator */
params = msStringSplit(pszSymbolId, ',', &numparams);
#else
params = msStringSplit(pszSymbolId, '.', &numparams);
#endif
if (params != NULL)
{
nSymbol = msGetSymbolIndex(symbolset, params[j], MS_FALSE);
for(int j=0; j<numparams && nSymbol == -1; j++)
{
nSymbol = msGetSymbolIndex(symbolset, params[j], MS_FALSE);
}
msFreeCharArray(params, numparams);
}
msFreeCharArray(params, numparams);
}
if (nSymbol == -1 && pszDefaultSymbol)
{
......
......@@ -39,7 +39,7 @@
#include "mapserver.h"
#include <assert.h>
MS_CVSID("$Id: maporaclespatial.c 9684 2010-01-12 20:06:44Z sdlime $")
MS_CVSID("$Id: maporaclespatial.c 10802 2010-12-16 22:16:46Z aboudreault $")
#ifdef USE_ORACLESPATIAL
......@@ -1321,7 +1321,7 @@ static void osPointCluster(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeo
{
int n;
//n = (end - start)/2;
n = (end - start)/2;
//n = interpretation;
//
......@@ -1895,6 +1895,7 @@ int msOracleSpatialLayerWhichShapes( layerObj *layer, rectObj rect )
int success, i;
int function = 0;
int version = 0;
int existunique = MS_FALSE;
char query_str[6000];
char *table_name;
char geom_column_name[100], unique[100], srid[100];
......@@ -1953,7 +1954,28 @@ int msOracleSpatialLayerWhichShapes( layerObj *layer, rectObj rect )
if (strcmp(srid,"NULL") == 0)
strcpy(srid,"-1");
sprintf( query_str, "SELECT %s", unique );
/* Check if the unique field is already in the items list */
for( i=0; i < layer->numitems; ++i ) {
if (strcmp(unique, layer->items[i])==0) {
existunique = MS_TRUE;
break;
}
}
if (existunique)
{
if (strcasecmp(unique, "rownum") == 0)
sprintf( query_str, "SELECT ");
else
sprintf( query_str, "SELECT %s, ", "rownum");
}
else
{
if (strcasecmp(unique, "rownum") == 0)
sprintf( query_str, "SELECT %s,", unique );
else
sprintf( query_str, "SELECT %s, %s,", "rownum", unique );
}
/* allocate enough space for items */
if (layer->numitems >= 0)
......@@ -1978,9 +2000,9 @@ int msOracleSpatialLayerWhichShapes( layerObj *layer, rectObj rect )
/* define SQL query */
for( i=0; i < layer->numitems; ++i )
sprintf( query_str + strlen(query_str), ", %s", layer->items[i] );
sprintf( query_str + strlen(query_str), "%s, ", layer->items[i] );
sprintf( query_str + strlen(query_str), ", %s FROM %s", geom_column_name, table_name );
sprintf( query_str + strlen(query_str), "%s FROM %s", geom_column_name, table_name );
osFilteritem(layer, function, query_str, 1);
......
/******************************************************************************
* $Id: mapows.c 9513 2009-10-26 17:18:18Z warmerdam $
* $Id: mapows.c 10642 2010-10-22 13:09:07Z assefa $
*
* Project: MapServer
* Purpose: OGC Web Services (WMS, WFS) support functions
......@@ -34,7 +34,7 @@
#include <stdarg.h>
#include <assert.h>
MS_CVSID("$Id: mapows.c 9513 2009-10-26 17:18:18Z warmerdam $")
MS_CVSID("$Id: mapows.c 10642 2010-10-22 13:09:07Z assefa $")
/*
** msOWSDispatch() is the entry point for any OWS request (WMS, WFS, ...)
......@@ -1180,7 +1180,11 @@ void msOWSPrintEX_GeographicBoundingBox(FILE *stream, const char *tabspace,
/* always project to lat long */
if (srcproj->numargs > 0 && !pj_is_latlong(srcproj->proj)) {
msProjectRect(srcproj, NULL, &ext);
projectionObj wgs84;
msInitProjection(&wgs84);
msLoadProjectionString(&wgs84, "+proj=longlat +datum=WGS84");
msProjectRect(srcproj, &wgs84, &ext);
msFreeProjection(&wgs84);
}
......
/*****************************************************************************
* $Id: mapows.h 9887 2010-02-23 19:30:57Z assefa $
* $Id: mapows.h 10868 2011-01-14 15:08:26Z assefa $
*
* Project: MapServer
* Purpose: OGC Web Services (WMS, WFS, WCS) support function definitions
......@@ -408,8 +408,8 @@ MS_DLL_EXPORT int msGMLWriteWFSQuery(mapObj *map, FILE *stream, int maxfeatures,
* mapwms.c
*====================================================================*/
int msWMSDispatch(mapObj *map, cgiRequestObj *req);
MS_DLL_EXPORT int msWMSLoadGetMapParams(mapObj *map, int nVersion,
char **names, char **values, int numentries);
MS_DLL_EXPORT int msWMSLoadGetMapParams(mapObj *map, int nVersion, char **names,
char **values, int numentries, char *wms_exception_format);
/*====================================================================
......
/******************************************************************************
* $Id: mappostgis.c 9967 2010-03-22 13:18:57Z dmorissette $
* $Id: mappostgis.c 10760 2010-11-24 17:29:47Z pramsey $
*
* Project: MapServer
* Purpose: PostGIS CONNECTIONTYPE support.
......@@ -68,7 +68,7 @@
#ifdef USE_POSTGIS
MS_CVSID("$Id: mappostgis.c 9967 2010-03-22 13:18:57Z dmorissette $")
MS_CVSID("$Id: mappostgis.c 10760 2010-11-24 17:29:47Z pramsey $")
/*
** msPostGISCloseConnection()
......@@ -1383,7 +1383,7 @@ int msPostGISReadShape(layerObj *layer, shapeObj *shape) {
wkbstrlen = PQgetlength(layerinfo->pgresult, layerinfo->rownum, layer->numitems);
if ( ! wkbstr ) {
msSetError(MS_QUERYERR, "Base64 WKB returned is null!", "msPostGISReadShape()");
msSetError(MS_QUERYERR, "String encoded WKB returned is null!", "msPostGISReadShape()");
return MS_FAILURE;
}
......
/******************************************************************************
* $Id: mapprimitive.c 9512 2009-10-26 15:49:03Z aboudreault $
* $Id: mapprimitive.c 10379 2010-07-22 08:23:12Z tbonfort $
*
* Project: MapServer
* Purpose: Implementations for rectObj, pointObj, lineObj, shapeObj, etc.
......@@ -32,7 +32,7 @@
#include <assert.h>
#include <locale.h>
MS_CVSID("$Id: mapprimitive.c 9512 2009-10-26 15:49:03Z aboudreault $")
MS_CVSID("$Id: mapprimitive.c 10379 2010-07-22 08:23:12Z tbonfort $")
typedef enum {CLIP_LEFT, CLIP_MIDDLE, CLIP_RIGHT} CLIP_STATE;
......@@ -187,12 +187,16 @@ void msShapeDeleteLine( shapeObj *shape, int line )
void msComputeBounds(shapeObj *shape)
{
int i, j;
if(shape->numlines <= 0) return;
if(shape->line[0].numpoints <= 0) return;
shape->bounds.minx = shape->bounds.maxx = shape->line[0].point[0].x;
shape->bounds.miny = shape->bounds.maxy = shape->line[0].point[0].y;
for(i=0;i<shape->numlines;i++) {
if(shape->line[i].numpoints > 0) {
shape->bounds.minx = shape->bounds.maxx = shape->line[i].point[0].x;
shape->bounds.miny = shape->bounds.maxy = shape->line[i].point[0].y;
break;
}
}
if(i == shape->numlines)
return; //no lines inside the shape contain any points
for( i=0; i<shape->numlines; i++ ) {
for( j=0; j<shape->line[i].numpoints; j++ ) {
......
......@@ -8,7 +8,7 @@
# - Run the VCVARS32.BAT script to initialize the VC++ environment variables
# - Start the build with: nmake /f makefile.vc
#
# $Id: Makefile.vc 10131 2010-05-02 12:34:21Z tamas $
# $Id: Makefile.vc 10441 2010-08-05 11:43:30Z tamas $
#
......@@ -48,7 +48,7 @@ CSC = csc $(CSDEBUG)
!ENDIF
!IF $(MSVC_VER) >= 1600
CSC = $(CSC) /define:CLR4 /debug:full
CSC = $(CSC) /define:CLR4
!ENDIF
#SWIG = swig
......
......@@ -20,6 +20,9 @@ public class mapscript {
internal static mapscriptObject themapscriptObject = new mapscriptObject();
protected static object ThisOwn_true() { return null; }
protected static object ThisOwn_false() { return themapscriptObject; }
[DllImport("mapscript", EntryPoint="SetEnvironmentVariable")]
public static extern int SetEnvironmentVariable(string envstring);
public static int msSaveImage(mapObj map, imageObj img, string filename) {
int ret = mapscriptPINVOKE.msSaveImage(mapObj.getCPtr(map), imageObj.getCPtr(img), filename);
......
......@@ -184,6 +184,10 @@ class mapscriptPINVOKE {
static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper();
static mapscriptPINVOKE() {
}
[DllImport("mapscript", EntryPoint="CSharp_new_intarray")]
public static extern IntPtr new_intarray(int jarg1);
......
......@@ -253,6 +253,20 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_mapscript(SWIG_CSharpStri
#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else
#ifdef __cplusplus
extern "C"
#endif
#ifdef SWIGEXPORT
SWIGEXPORT int SWIGSTDCALL SetEnvironmentVariable(const char *envstring) {
return putenv(envstring);
}
#else
DllExport int SWIGSTDCALL SetEnvironmentVariable(const char *envstring) {
return putenv(envstring);
}
#endif
/* Errors in SWIG */
#define SWIG_UnknownError -1
#define SWIG_IOError -2
......@@ -3084,7 +3098,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_MS_VERSION_get() {
char * jresult ;
char *result = 0 ;
result = (char *) "5.6.5";
result = (char *) "5.6.6";
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
......@@ -3114,7 +3128,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_MS_VERSION_REV_get() {
int jresult ;
int result;
result = (int) 5;
result = (int) 6;
jresult = result;
return jresult;
}
......@@ -3124,7 +3138,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_MS_VERSION_NUM_get() {
int jresult ;
int result;
result = (int) (5*10000+6*100+5);
result = (int) (5*10000+6*100+6);
jresult = result;
return jresult;
}
......
/******************************************************************************
* $Id: swig_csharp_extensions.i 7418 2008-02-29 00:02:49Z nsavard $
* $Id: swig_csharp_extensions.i 10808 2010-12-20 16:03:35Z tamas $
*
* Project: MapServer
* Purpose: Fix for the SWIG Interface problems (early GC)
......@@ -29,6 +29,12 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
// Ensure the class is not marked BeforeFieldInit causing memory corruption with CLR4
%pragma(csharp) imclasscode=%{
static $imclassname() {
}
%}
%typemap(csout, excode=SWIGEXCODE) SWIGTYPE {
$&csclassname ret = new $&csclassname($imcall, true, null);$excode
return ret;
......@@ -202,5 +208,22 @@
internal static $moduleObject the$moduleObject = new $moduleObject();
protected static object ThisOwn_true() { return null; }
protected static object ThisOwn_false() { return the$moduleObject; }
[DllImport("$dllimport", EntryPoint="SetEnvironmentVariable")]
public static extern int SetEnvironmentVariable(string envstring);
%}
%insert(runtime) %{
#ifdef __cplusplus
extern "C"
#endif
#ifdef SWIGEXPORT
SWIGEXPORT int SWIGSTDCALL SetEnvironmentVariable(const char *envstring) {
return putenv(envstring);
}
#else
DllExport int SWIGSTDCALL SetEnvironmentVariable(const char *envstring) {
return putenv(envstring);
}
#endif
%}
/*
:Author: David Goodger
:Contact: goodger@users.sourceforge.net
:date: $Date: 2004-02-18 17:46:26 -0500 (Wed, 18 Feb 2004) $
:date: $Date: 2004-02-18 14:46:26 -0800 (Wed, 18 Feb 2004) $
:version: $Revision: 2764 $
:copyright: This stylesheet has been placed in the public domain.
......
......@@ -127,6 +127,11 @@ jstring JNU_NewStringNative(JNIEnv *env, const char *str) {
$1 = JNU_GetStringNativeChars(jenv, $input);
}
/* The default mapping would use ReleaseStringUTFChars to release the
memory allocated with JNU_GetStringNativeChars which causes a
memory corruption. (#3491) */
%typemap(freearg, noblock=1) char * { if ($1) free($1); }
%typemap(out) char * {
$result = JNU_NewStringNative(jenv, $1);
}
......
......@@ -42827,7 +42827,7 @@ XS(SWIG_init) {
/*@SWIG:/usr/share/swig1.3/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "MS_VERSION", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_FromCharPtr("5.6.5"));
sv_setsv(sv, SWIG_FromCharPtr("5.6.6"));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/share/swig1.3/perl5/perltypemaps.swg,64,%set_constant@*/ do {
......@@ -42842,12 +42842,12 @@ XS(SWIG_init) {
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/share/swig1.3/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "MS_VERSION_REV", TRUE | 0x2 | GV_ADDMULTI);
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(5)));
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(6)));
SvREADONLY_on(sv);
} while(0) /*@SWIG@*/;
/*@SWIG:/usr/share/swig1.3/perl5/perltypemaps.swg,64,%set_constant@*/ do {
SV *sv = get_sv((char*) SWIG_prefix "MS_VERSION_NUM", TRUE | 0x2 | GV_ADDMULTI);