Extend map sets so as to be able to handle varin' and varout'.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@310 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Thien-Thi Nguyen 2000-03-02 01:12:44 +00:00
commit e92482e4d9

View file

@ -5,28 +5,38 @@
#define MK_SIMPLE_MAP(f) $target = f ($source)
%typemap (guile, in) bool { MK_SIMPLE_MAP (gh_scm2bool); }
%typemap (guile, in) char { MK_SIMPLE_MAP (gh_scm2char); }
%typemap (guile, in) int { MK_SIMPLE_MAP (gh_scm2int); }
%typemap (guile, in) short { MK_SIMPLE_MAP (gh_scm2int); }
%typemap (guile, in) long { MK_SIMPLE_MAP (gh_scm2long); }
%typemap (guile, in) unsigned int { MK_SIMPLE_MAP (gh_scm2ulong); }
%typemap (guile, in) unsigned short { MK_SIMPLE_MAP (gh_scm2ulong); }
%typemap (guile, in) unsigned long { MK_SIMPLE_MAP (gh_scm2ulong); }
%typemap (guile, in) float { MK_SIMPLE_MAP (gh_scm2double); }
%typemap (guile, in) double { MK_SIMPLE_MAP (gh_scm2double); }
#define SIMPLE_IN_MAP_SET(op) \
%typemap (guile, op) bool { MK_SIMPLE_MAP (gh_scm2bool); } \
%typemap (guile, op) char { MK_SIMPLE_MAP (gh_scm2char); } \
%typemap (guile, op) int { MK_SIMPLE_MAP (gh_scm2int); } \
%typemap (guile, op) short { MK_SIMPLE_MAP (gh_scm2int); } \
%typemap (guile, op) long { MK_SIMPLE_MAP (gh_scm2long); } \
%typemap (guile, op) unsigned int { MK_SIMPLE_MAP (gh_scm2ulong); } \
%typemap (guile, op) unsigned short { MK_SIMPLE_MAP (gh_scm2ulong); } \
%typemap (guile, op) unsigned long { MK_SIMPLE_MAP (gh_scm2ulong); } \
%typemap (guile, op) float { MK_SIMPLE_MAP (gh_scm2double); } \
%typemap (guile, op) double { MK_SIMPLE_MAP (gh_scm2double); }
%typemap (guile, out) bool { MK_SIMPLE_MAP (gh_bool2scm); }
%typemap (guile, out) char { MK_SIMPLE_MAP (gh_char2scm); }
%typemap (guile, out) int { MK_SIMPLE_MAP (gh_int2scm); }
%typemap (guile, out) short { MK_SIMPLE_MAP (gh_int2scm); }
%typemap (guile, out) long { MK_SIMPLE_MAP (gh_long2scm); }
%typemap (guile, out) unsigned int { MK_SIMPLE_MAP (gh_ulong2scm); }
%typemap (guile, out) unsigned short { MK_SIMPLE_MAP (gh_ulong2scm); }
%typemap (guile, out) unsigned long { MK_SIMPLE_MAP (gh_ulong2scm); }
%typemap (guile, out) float { MK_SIMPLE_MAP (gh_double2scm); }
%typemap (guile, out) double { MK_SIMPLE_MAP (gh_double2scm); }
#define SIMPLE_OUT_MAP_SET(op) \
%typemap (guile, op) bool { MK_SIMPLE_MAP (gh_bool2scm); } \
%typemap (guile, op) char { MK_SIMPLE_MAP (gh_char2scm); } \
%typemap (guile, op) int { MK_SIMPLE_MAP (gh_int2scm); } \
%typemap (guile, op) short { MK_SIMPLE_MAP (gh_int2scm); } \
%typemap (guile, op) long { MK_SIMPLE_MAP (gh_long2scm); } \
%typemap (guile, op) unsigned int { MK_SIMPLE_MAP (gh_ulong2scm); } \
%typemap (guile, op) unsigned short { MK_SIMPLE_MAP (gh_ulong2scm); } \
%typemap (guile, op) unsigned long { MK_SIMPLE_MAP (gh_ulong2scm); } \
%typemap (guile, op) float { MK_SIMPLE_MAP (gh_double2scm); } \
%typemap (guile, op) double { MK_SIMPLE_MAP (gh_double2scm); }
#undef MK_SIMPLE_MAP
/*
* Declaration start here
*/
SIMPLE_IN_MAP_SET (in)
SIMPLE_IN_MAP_SET (varin)
SIMPLE_OUT_MAP_SET (out)
SIMPLE_OUT_MAP_SET (varout)
/* typemaps.i ends here */