Skip to content

Commit

Permalink
replace all occurrences of gdFree with msFree
Browse files Browse the repository at this point in the history
  • Loading branch information
unicolet committed Apr 13, 2012
1 parent b6192fd commit cf5fbdd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion mapgd.c
Expand Up @@ -928,7 +928,7 @@ int getTruetypeTextBBoxGD(rendererVTableObj *renderer, char **fonts, int numfont
s++;
}

gdFree(strex.xshow); /* done with character advances */
msFree(strex.xshow); /* done with character advances */

rect->minx = bbox[0];
rect->miny = bbox[5];
Expand Down
2 changes: 1 addition & 1 deletion mapscript/csharp/csmodule.i
Expand Up @@ -320,7 +320,7 @@ static SWIG_CSharpByteArrayHelperCallback SWIG_csharp_bytearray_callback = NULL;

%typemap(out, null="") gdBuffer
%{ SWIG_csharp_bytearray_callback($1.data, $1.size);
if( $1.owns_data ) gdFree($1.data); %}
if( $1.owns_data ) msFree($1.data); %}

// SWIGEXCODE is a macro used by many other csout typemaps
#ifdef SWIGEXCODE
Expand Down
2 changes: 1 addition & 1 deletion mapscript/java/javamodule.i
Expand Up @@ -23,7 +23,7 @@

%typemap(out) gdBuffer
%{ $result = SWIG_JavaArrayOutSchar(jenv, $1.data, $1.size);
if( $1.owns_data ) gdFree($1.data); %}
if( $1.owns_data ) msFree($1.data); %}

%typemap(javain) gdBuffer "$javainput"
%typemap(javaout) gdBuffer {
Expand Down
2 changes: 1 addition & 1 deletion mapscript/perl/plmodule.i
Expand Up @@ -41,7 +41,7 @@
sv_2mortal($result);
argvi++;
if( $1.owns_data )
gdFree($1.data);
msFree($1.data);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion mapscript/python/pymodule.i
Expand Up @@ -34,7 +34,7 @@
%typemap(out) gdBuffer {
$result = PyString_FromStringAndSize((const char*)$1.data, $1.size);
if( $1.owns_data )
gdFree($1.data);
msFree($1.data);
}

/**************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion mapscript/ruby/rbmodule.i
Expand Up @@ -20,7 +20,7 @@
/* To support imageObj::getBytes */
%typemap(out) gdBuffer {
$result = rb_str_new($1.data, $1.size);
gdFree($1.data);
msFree($1.data);
}

/**************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions mapscript/swiginc/image.i
Expand Up @@ -208,7 +208,7 @@
/* Tcl implementation to create string */
imgstring = Tcl_NewByteArrayObj(imgbytes, size);

gdFree(imgbytes);
msFree(imgbytes);

return imgstring;
#else /* force_gd_broken_code */
Expand All @@ -223,7 +223,7 @@
-------------------------------------------------------------------------
getBytes returns a gdBuffer structure (defined in mapscript.i) which must
be typemapped to an object appropriate to the target language. This
typemap must also gdFree the data member of the gdBuffer. See the type-
typemap must also msFree the data member of the gdBuffer. See the type-
maps in java/javamodule.i and python/pymodule.i for examples.
contributed by Jerry Pisk, jerry.pisk@gmail.com
Expand Down

0 comments on commit cf5fbdd

Please sign in to comment.