remove deprecated language specification in %typemap

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8327 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-01-09 21:23:27 +00:00
commit 281f34873a
5 changed files with 24 additions and 24 deletions

View file

@ -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);

View file

@ -1596,7 +1596,7 @@ zlib:inflate-init
<font color="red">
/* 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 (&amp;scmstr, *$2, $1));
@ -1633,7 +1633,7 @@ zlib:inflate-init
"$1 = &amp;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 (&amp;scmstr, *$2, $1));

View file

@ -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));

View file

@ -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);
}

View file

@ -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);