PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Lib/modula3/typemaps.i

#
Swig | 74 lines | 57 code | 6 blank | 11 comment | 0 complexity | 86c8ec8b5a5b5b64b66ec4b34a94126b MD5 | raw file
 1/* -----------------------------------------------------------------------------
 2 * typemaps.i
 3 *
 4 * Pointer and reference handling typemap library
 5 *
 6 * These mappings provide support for input/output arguments and common
 7 * uses for C/C++ pointers and C++ references.
 8 * ----------------------------------------------------------------------------- */
 9
10/* These typemaps will eventually probably maybe make their way into named typemaps
11 * OUTPUT * and OUTPUT & as they currently break functions that return a pointer or 
12 * reference. */
13
14%typemap(ctype) bool *,               bool &               "bool *"
15%typemap(ctype)                       char &               "char *"
16%typemap(ctype) signed char *,        signed char &        "signed char *"
17%typemap(ctype) unsigned char *,      unsigned char &      "unsigned short *"
18%typemap(ctype) short *,              short &              "short *"
19%typemap(ctype) unsigned short *,     unsigned short &     "unsigned short *"
20%typemap(ctype) int *,                int &                "int *"
21%typemap(ctype) unsigned int *,       unsigned int &       "unsigned int *"
22%typemap(ctype) long *,               long &               "long *"
23%typemap(ctype) unsigned long *,      unsigned long &      "unsigned long *"
24%typemap(ctype) long long *,          long long &          "long long *"
25%typemap(ctype) unsigned long long *, unsigned long long & "unsigned long long *"
26%typemap(ctype) float *,              float &              "float *"
27%typemap(ctype) double *,             double &             "double *"
28
29%typemap(imtype) bool *,               bool &               "ref bool"
30%typemap(imtype)                       char &               "ref char"
31%typemap(imtype) signed char *,        signed char &        "ref sbyte"
32%typemap(imtype) unsigned char *,      unsigned char &      "ref byte"
33%typemap(imtype) short *,              short &              "ref short"
34%typemap(imtype) unsigned short *,     unsigned short &     "ref ushort"
35%typemap(imtype) int *,                int &                "ref int"
36%typemap(imtype) unsigned int *,       unsigned int &       "ref uint"
37%typemap(imtype) long *,               long &               "ref int"
38%typemap(imtype) unsigned long *,      unsigned long &      "ref uint"
39%typemap(imtype) long long *,          long long &          "ref long"
40%typemap(imtype) unsigned long long *, unsigned long long & "ref ulong"
41%typemap(imtype) float *,              float &              "ref float"
42%typemap(imtype) double *,             double &             "ref double"
43
44%typemap(cstype) bool *,               bool &               "ref bool"
45%typemap(cstype)                       char &               "ref char"
46%typemap(cstype) signed char *,        signed char &        "ref sbyte"
47%typemap(cstype) unsigned char *,      unsigned char &      "ref byte"
48%typemap(cstype) short *,              short &              "ref short"
49%typemap(cstype) unsigned short *,     unsigned short &     "ref ushort"
50%typemap(cstype) int *,                int &                "ref int"
51%typemap(cstype) unsigned int *,       unsigned int &       "ref uint"
52%typemap(cstype) long *,               long &               "ref int"
53%typemap(cstype) unsigned long *,      unsigned long &      "ref uint"
54%typemap(cstype) long long *,          long long &          "ref long"
55%typemap(cstype) unsigned long long *, unsigned long long & "ref ulong"
56%typemap(cstype) float *,              float &              "ref float"
57%typemap(cstype) double *,             double &             "ref double"
58
59%typemap(csin)   bool *,               bool &,
60                                       char &,
61                 signed char *,        signed char &,
62                 unsigned char *,      unsigned char &,
63                 short *,              short &,
64                 unsigned short *,     unsigned short &,
65                 int *,                int &,
66                 unsigned int *,       unsigned int &,
67                 long *,               long &,
68                 unsigned long *,      unsigned long &,
69                 long long *,          long long &,
70                 unsigned long long *, unsigned long long &,
71                 float *,              float &,
72                 double *,             double &
73    "ref $csinput"
74