From 281f34873ab89178f0b717cb7952f50a42ab71bb Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 9 Jan 2006 21:23:27 +0000 Subject: [PATCH] remove deprecated language specification in %typemap git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8327 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/chicken/multimap/example.i | 10 +++++----- Examples/chicken/zlib/README.html | 8 ++++---- Examples/chicken/zlib/example.i | 10 +++++----- Examples/guile/multimap/example.i | 10 +++++----- Examples/mzscheme/multimap/example.i | 10 +++++----- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Examples/chicken/multimap/example.i b/Examples/chicken/multimap/example.i index 7bacadab7..02567f48f 100644 --- a/Examples/chicken/multimap/example.i +++ b/Examples/chicken/multimap/example.i @@ -15,7 +15,7 @@ extern int squareCubed (int n, int *OUTPUT); extern int gcd(int x, int y); -%typemap(chicken,in) (int argc, char *argv[]) { +%typemap(in) (int argc, char *argv[]) { int i; if (!C_swig_is_vector ($input)) { swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Argument $input is not a vector"); @@ -35,12 +35,12 @@ extern int gcd(int x, int y); $2[i] = 0; } -%typemap(chicken,freear) (int argc, char *argv[]) { +%typemap(freearg) (int argc, char *argv[]) { free($2); } extern int gcdmain(int argc, char *argv[]); -%typemap(chicken,in) (char *bytes, int len) { +%typemap(in) (char *bytes, int len) { if (!C_swig_is_string ($input)) { swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Argument $input is not a string"); } @@ -53,7 +53,7 @@ extern int count(char *bytes, int len, char c); /* This example shows how to wrap a function that mutates a string */ -%typemap(chicken,in) (char *str, int len) +%typemap(in) (char *str, int len) %{ if (!C_swig_is_string ($input)) { swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Argument $input is not a string"); } @@ -64,7 +64,7 @@ extern int count(char *bytes, int len, char c); /* Return the mutated string as a new object. Notice the if MANY construct ... they must be at column 0. */ -%typemap(chicken,argout) (char *str, int len) (C_word *scmstr) +%typemap(argout) (char *str, int len) (C_word *scmstr) %{ scmstr = C_alloc (C_SIZEOF_STRING ($2)); SWIG_APPEND_VALUE(C_string (&scmstr, $2, $1)); free ($1); diff --git a/Examples/chicken/zlib/README.html b/Examples/chicken/zlib/README.html index dd5dfcc97..b082a310c 100644 --- a/Examples/chicken/zlib/README.html +++ b/Examples/chicken/zlib/README.html @@ -1596,7 +1596,7 @@ zlib:inflate-init /* Allow the sourceLen to be automatically filled in from the length of the 'source' string */ -%typemap(chicken,in) (const Bytef *source, uLong sourceLen) +%typemap(in) (const Bytef *source, uLong sourceLen) %{ if (!C_swig_is_string ($input)) { swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Argument $input is not a string"); } @@ -1607,7 +1607,7 @@ zlib:inflate-init /* Allocate space the size of which is determined by the Scheme integer argument, and make a temporary integer so we can set destLen. */ -%typemap(chicken,in) (Bytef *dest, uLongf *destLen) (uLong len) +%typemap(in) (Bytef *dest, uLongf *destLen) (uLong len) %{ if (!C_swig_is_fixnum ($input)) { swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Argument $input is not a integer"); } @@ -1617,7 +1617,7 @@ zlib:inflate-init %} /* Return the mutated string as a new object. */ -%typemap(chicken,argout) (Bytef *dest, uLongf *destLen) +%typemap(argout) (Bytef *dest, uLongf *destLen) (C_word *scmstr) %{ scmstr = C_alloc (C_SIZEOF_STRING (*$2)); SWIG_APPEND_VALUE(C_string (&scmstr, *$2, $1)); @@ -1633,7 +1633,7 @@ zlib:inflate-init "$1 = &len;"; /* Return a sized string as a new object. */ -%typemap(chicken,argout) +%typemap(argout) (void *outstr, uLongf *destLen) (C_word *scmstr) %{ scmstr = C_alloc (C_SIZEOF_STRING (*$2)); SWIG_APPEND_VALUE(C_string (&scmstr, *$2, $1)); diff --git a/Examples/chicken/zlib/example.i b/Examples/chicken/zlib/example.i index 60cb5e0f4..dd962ad56 100644 --- a/Examples/chicken/zlib/example.i +++ b/Examples/chicken/zlib/example.i @@ -13,7 +13,7 @@ /* Allow the sourceLen to be automatically filled in from the length of the 'source' string */ -%typemap(chicken,in) (const Bytef *source, uLong sourceLen) +%typemap(in) (const Bytef *source, uLong sourceLen) %{ if (!C_swig_is_string ($input)) { swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Argument $input is not a string"); } @@ -24,7 +24,7 @@ /* Allocate space the size of which is determined by the Scheme integer argument, and make a temporary integer so we can set destLen. */ -%typemap(chicken,in) (Bytef *dest, uLongf *destLen) (uLong len) +%typemap(in) (Bytef *dest, uLongf *destLen) (uLong len) %{ if (!C_swig_is_fixnum ($input)) { swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Argument $input is not a integer"); } @@ -34,7 +34,7 @@ %} /* Return the mutated string as a new object. */ -%typemap(chicken,argout) (Bytef *dest, uLongf *destLen) +%typemap(argout) (Bytef *dest, uLongf *destLen) (C_word *scmstr) %{ scmstr = C_alloc (C_SIZEOF_STRING (*$2)); SWIG_APPEND_VALUE(C_string (&scmstr, *$2, $1)); @@ -46,11 +46,11 @@ /* Ignore destLen as an input argument, and make a temporary integer so we can set destLen. */ -%typemap(in, numinputs=0) uLongf *destLen (uLong len) +%typemap(numinputs=0) uLongf *destLen (uLong len) "$1 = &len;"; /* Return a sized string as a new object. */ -%typemap(chicken,argout) +%typemap(argout) (void *outstr, uLongf *destLen) (C_word *scmstr) %{ scmstr = C_alloc (C_SIZEOF_STRING (*$2)); SWIG_APPEND_VALUE(C_string (&scmstr, *$2, $1)); diff --git a/Examples/guile/multimap/example.i b/Examples/guile/multimap/example.i index 6bd018d68..85a2bb18e 100644 --- a/Examples/guile/multimap/example.i +++ b/Examples/guile/multimap/example.i @@ -15,7 +15,7 @@ extern int squareCubed (int n, int *OUTPUT); extern int gcd(int x, int y); -%typemap(guile,in) (int argc, char *argv[]) { +%typemap(in) (int argc, char *argv[]) { int i; SCM *v; if (!(SCM_NIMP($input) && SCM_VECTORP($input))) { @@ -39,13 +39,13 @@ extern int gcd(int x, int y); $2[i] = 0; } -%typemap(guile,freearg) (int argc, char *argv[]) { +%typemap(freearg) (int argc, char *argv[]) { free($2); } extern int gcdmain(int argc, char *argv[]); -%typemap(guile,in) (char *bytes, int len) { +%typemap(in) (char *bytes, int len) { if (!(SCM_NIMP($input) && SCM_STRINGP($input))) { SWIG_exception(SWIG_ValueError, "Expecting a string"); } @@ -57,13 +57,13 @@ extern int count(char *bytes, int len, char c); /* This example shows how to wrap a function that mutates a string */ -%typemap(guile,in) (char *str, int len) { +%typemap(in) (char *str, int len) { $1 = gh_scm2newstr($input,&$2); } /* Return the mutated string as a new object. */ -%typemap(guile,argout) (char *str, int len) { +%typemap(argout) (char *str, int len) { SWIG_APPEND_VALUE(gh_str2scm($1,$2)); if ($1) scm_must_free($1); } diff --git a/Examples/mzscheme/multimap/example.i b/Examples/mzscheme/multimap/example.i index b2c839e48..515948abc 100644 --- a/Examples/mzscheme/multimap/example.i +++ b/Examples/mzscheme/multimap/example.i @@ -15,7 +15,7 @@ extern int squareCubed (int n, int *OUTPUT); extern int gcd(int x, int y); -%typemap(mzscheme,in) (int argc, char *argv[]) { +%typemap(in) (int argc, char *argv[]) { int i; Scheme_Object **elms; if (!SCHEME_VECTORP($input)) { @@ -37,12 +37,12 @@ extern int gcd(int x, int y); $2[i] = 0; } -%typemap(mzscheme,freear) (int argc, char *argv[]) { +%typemap(freearg) (int argc, char *argv[]) { free($2); } extern int gcdmain(int argc, char *argv[]); -%typemap(mzscheme,in) (char *bytes, int len) { +%typemap(in) (char *bytes, int len) { if (!SCHEME_STRINGP($input)) { scheme_wrong_type("$name","string",1,argc,argv); } @@ -55,7 +55,7 @@ extern int count(char *bytes, int len, char c); /* This example shows how to wrap a function that mutates a string */ -%typemap(mzscheme,in) (char *str, int len) { +%typemap(in) (char *str, int len) { if (!SCHEME_STRINGP($input)) { scheme_wrong_type("$name","string",1,argc,argv); } @@ -66,7 +66,7 @@ extern int count(char *bytes, int len, char c); /* Return the mutated string as a new object. */ -%typemap(mzscheme,argout) (char *str, int len) { +%typemap(argout) (char *str, int len) { Scheme_Object *s; s = scheme_make_sized_string($1,$2,1); SWIG_APPEND_VALUE(s);