summaryrefslogtreecommitdiff
path: root/includes/Dotnet.h
blob: 89dace2ced9f741a62e30824c8e359ec17d0634b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * Types and definitions to support GHC .NET interop.
 *
 * (c) 2003, sof.
 *
 */
#ifndef __DOTNET_H__
#define __DOTNET_H__

typedef enum { 
  Dotnet_Byte = 0,
  Dotnet_Boolean,
  Dotnet_Char,
  Dotnet_Double,
  Dotnet_Float,
  Dotnet_Int,
  Dotnet_Int8,
  Dotnet_Int16,
  Dotnet_Int32,
  Dotnet_Int64,
  Dotnet_Word8,
  Dotnet_Word16,
  Dotnet_Word32,
  Dotnet_Word64,
  Dotnet_Ptr,
  Dotnet_Unit,
  Dotnet_Object,
  Dotnet_String
} DotnetType;

typedef union {
  unsigned char      arg_byte;
  unsigned int       arg_bool;
  unsigned char      arg_char;
  int                arg_int;
  signed   char      arg_int8;
  signed   short     arg_int16;
  signed   int       arg_int32;
#if defined(_MSC_VER)
  signed  __int64    arg_int64;
#else
  signed  long long  arg_int64;
#endif
  float              arg_float;
  double             arg_double;
  unsigned char      arg_word8;
  unsigned short     arg_word16;
  unsigned int       arg_word32;
#if defined(_MSC_VER)
  unsigned __int64   arg_word64;
#else
  unsigned long long arg_word64;
#endif
  void*              arg_ptr;
  void*              arg_obj;
  void*              arg_str;
} DotnetArgVal;

typedef struct {
  DotnetArgVal arg;
  DotnetType   arg_type;
} DotnetArg;

#endif /* __DOTNET_H__ */