~ubuntu-branches/ubuntu/hardy/swig1.3/hardy

« back to all changes in this revision

Viewing changes to Lib/mzscheme/typemaps.i

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
   Copyright 2000, 2001, 2004 Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
3
3
   Based on code written by Oleg Tolmatcev.
4
4
 
5
 
   $Id: typemaps.i,v 1.8 2004/02/23 12:56:57 mkoeppe Exp $
 
5
   $Id: typemaps.i,v 1.11 2005/03/30 19:53:58 mkoeppe Exp $
6
6
*/
7
7
 
8
8
/* The MzScheme module handles all types uniformly via typemaps. Here
91
91
%typemap(in) enum SWIGTYPE {
92
92
  if (!SCHEME_INTP($input)) 
93
93
      scheme_wrong_type(FUNC_NAME, "integer", $argnum - 1, argc, argv);
94
 
  $1 = SCHEME_INT_VAL($input);
 
94
  $1 = ($1_type) SCHEME_INT_VAL($input);
95
95
}
96
96
 
97
97
%typemap(varin) enum SWIGTYPE {
214
214
           scheme_make_double, real);
215
215
SIMPLE_MAP(double, SCHEME_REALP, scheme_real_to_double,
216
216
           scheme_make_double, real);
 
217
 
217
218
SIMPLE_MAP(char *, SCHEME_STRINGP, SCHEME_STR_VAL, 
218
 
           scheme_make_string_without_copying, string);
 
219
           SCHEME_MAKE_STRING, string);
219
220
SIMPLE_MAP(const char *, SCHEME_STRINGP, SCHEME_STR_VAL, 
220
 
           scheme_make_string_without_copying, string);
 
221
           SCHEME_MAKE_STRING, string);
221
222
 
 
223
/* For MzScheme 30x:  Use these typemaps if you are not going to use
 
224
   UTF8 encodings in your C code. 
 
225
 SIMPLE_MAP(char *,SCHEME_BYTE_STRINGP, SCHEME_BYTE_STR_VAL,
 
226
           scheme_make_byte_string_without_copying,bytestring);
 
227
 SIMPLE_MAP(const char *,SCHEME_BYTE_STRINGP, SCHEME_BYTE_STR_VAL,
 
228
           scheme_make_byte_string_without_copying,bytestring);
 
229
*/
222
230
 
223
231
/* Const primitive references.  Passed by value */
224
232