2237da24aa82e961f2dfea8acb3a6591524e31e1
[mono.git] / mono / metadata / metadata.h
1
2 #ifndef __MONO_METADATA_H__
3 #define __MONO_METADATA_H__
4
5 #include <mono/utils/mono-publib.h>
6
7 #include <mono/metadata/blob.h>
8 #include <mono/metadata/row-indexes.h>
9 #include <mono/metadata/image.h>
10
11 MONO_BEGIN_DECLS
12
13 /*
14  * When embedding, you have to define MONO_ZERO_LEN_ARRAY before including any
15  * other Mono header file if you use a different compiler from the one used to
16  * build Mono.
17  */
18 #ifndef MONO_ZERO_LEN_ARRAY
19 #ifdef __GNUC__
20 #define MONO_ZERO_LEN_ARRAY 0
21 #else
22 #define MONO_ZERO_LEN_ARRAY 1
23 #endif
24 #endif
25
26 #define MONO_TYPE_ISSTRUCT(t) (!(t)->byref && (((t)->type == MONO_TYPE_VALUETYPE && \
27         !(t)->data.klass->enumtype) || ((t)->type == MONO_TYPE_TYPEDBYREF) || \
28         (((t)->type == MONO_TYPE_GENERICINST) && mono_metadata_generic_class_is_valuetype ((t)->data.generic_class) && !(t)->data.generic_class->container_class->enumtype)))
29
30 #define MONO_TYPE_IS_VOID(t) ((t) && ((t)->type == MONO_TYPE_VOID) && !(t)->byref)
31 #define MONO_TYPE_IS_POINTER(t) ((t) && (((t)->byref || ((t)->type == MONO_TYPE_I) || (t)->type == MONO_TYPE_STRING) || ((t)->type == MONO_TYPE_SZARRAY) || ((t)->type == MONO_TYPE_CLASS) || ((t)->type == MONO_TYPE_CLASS) || ((t)->type == MONO_TYPE_OBJECT) || ((t)->type == MONO_TYPE_ARRAY) || ((t)->type == MONO_TYPE_PTR)))
32
33 #define MONO_TYPE_IS_REFERENCE(t) ((t) &&                                       \
34                                    ((((t)->type == MONO_TYPE_STRING) ||         \
35                                      ((t)->type == MONO_TYPE_SZARRAY) ||        \
36                                      ((t)->type == MONO_TYPE_CLASS) ||          \
37                                      ((t)->type == MONO_TYPE_OBJECT) ||         \
38                                      ((t)->type == MONO_TYPE_ARRAY)) ||         \
39                                     (((t)->type == MONO_TYPE_GENERICINST) &&    \
40                                      !mono_metadata_generic_class_is_valuetype ((t)->data.generic_class))))
41
42 #define MONO_CLASS_IS_INTERFACE(c) ((c->flags & TYPE_ATTRIBUTE_INTERFACE) || (c->byval_arg.type == MONO_TYPE_VAR) || (c->byval_arg.type == MONO_TYPE_MVAR))
43
44 #define MONO_CLASS_IS_IMPORT(c) ((c->flags & TYPE_ATTRIBUTE_IMPORT))
45
46 typedef struct _MonoClass MonoClass;
47 typedef struct _MonoDomain MonoDomain;
48 typedef struct _MonoMethod MonoMethod;
49
50 typedef enum {
51         MONO_EXCEPTION_CLAUSE_NONE,
52         MONO_EXCEPTION_CLAUSE_FILTER,
53         MONO_EXCEPTION_CLAUSE_FINALLY,
54         MONO_EXCEPTION_CLAUSE_FAULT = 4
55 } MonoExceptionEnum;
56
57 typedef enum {
58         MONO_CALL_DEFAULT,
59         MONO_CALL_C,
60         MONO_CALL_STDCALL,
61         MONO_CALL_THISCALL,
62         MONO_CALL_FASTCALL,
63         MONO_CALL_VARARG
64 } MonoCallConvention;
65
66 /* ECMA lamespec: the old spec had more info... */
67 typedef enum {
68         MONO_NATIVE_BOOLEAN = 0x02, /* 4 bytes, 0 is false, != 0 is true */
69         MONO_NATIVE_I1 = 0x03,
70         MONO_NATIVE_U1 = 0x04,
71         MONO_NATIVE_I2 = 0x05,
72         MONO_NATIVE_U2 = 0x06,
73         MONO_NATIVE_I4 = 0x07,
74         MONO_NATIVE_U4 = 0x08,
75         MONO_NATIVE_I8 = 0x09,
76         MONO_NATIVE_U8 = 0x0a,
77         MONO_NATIVE_R4 = 0x0b,
78         MONO_NATIVE_R8 = 0x0c,
79         MONO_NATIVE_CURRENCY = 0x0f,
80         MONO_NATIVE_BSTR = 0x13, /* prefixed length, Unicode */
81         MONO_NATIVE_LPSTR = 0x14, /* ANSI, null terminated */
82         MONO_NATIVE_LPWSTR = 0x15, /* UNICODE, null terminated */
83         MONO_NATIVE_LPTSTR = 0x16, /* plattform dep., null terminated */
84         MONO_NATIVE_BYVALTSTR = 0x17,
85         MONO_NATIVE_IUNKNOWN = 0x19,
86         MONO_NATIVE_IDISPATCH = 0x1a,
87         MONO_NATIVE_STRUCT = 0x1b,
88         MONO_NATIVE_INTERFACE = 0x1c,
89         MONO_NATIVE_SAFEARRAY = 0x1d,
90         MONO_NATIVE_BYVALARRAY = 0x1e,
91         MONO_NATIVE_INT   = 0x1f,
92         MONO_NATIVE_UINT  = 0x20,
93         MONO_NATIVE_VBBYREFSTR  = 0x22,
94         MONO_NATIVE_ANSIBSTR  = 0x23,  /* prefixed length, ANSI */
95         MONO_NATIVE_TBSTR  = 0x24, /* prefixed length, plattform dep. */
96         MONO_NATIVE_VARIANTBOOL  = 0x25,
97         MONO_NATIVE_FUNC  = 0x26,
98         MONO_NATIVE_ASANY = 0x28,
99         MONO_NATIVE_LPARRAY = 0x2a,
100         MONO_NATIVE_LPSTRUCT = 0x2b,
101         MONO_NATIVE_CUSTOM = 0x2c,
102         MONO_NATIVE_ERROR = 0x2d,
103         MONO_NATIVE_MAX = 0x50 /* no info */
104 } MonoMarshalNative;
105
106 /* Used only in context of SafeArray */
107 typedef enum {
108         MONO_VARIANT_EMPTY = 0x00,
109         MONO_VARIANT_NULL = 0x01,
110         MONO_VARIANT_I2 = 0x02,
111         MONO_VARIANT_I4 = 0x03,
112         MONO_VARIANT_R4 = 0x04,
113         MONO_VARIANT_R8 = 0x05,
114         MONO_VARIANT_CY = 0x06,
115         MONO_VARIANT_DATE = 0x07,
116         MONO_VARIANT_BSTR = 0x08,
117         MONO_VARIANT_DISPATCH = 0x09,
118         MONO_VARIANT_ERROR = 0x0a,
119         MONO_VARIANT_BOOL = 0x0b,
120         MONO_VARIANT_VARIANT = 0x0c,
121         MONO_VARIANT_UNKNOWN = 0x0d,
122         MONO_VARIANT_DECIMAL = 0x0e,
123         MONO_VARIANT_I1 = 0x10,
124         MONO_VARIANT_UI1 = 0x11,
125         MONO_VARIANT_UI2 = 0x12,
126         MONO_VARIANT_UI4 = 0x13,
127         MONO_VARIANT_I8 = 0x14,
128         MONO_VARIANT_UI8 = 0x15,
129         MONO_VARIANT_INT = 0x16,
130         MONO_VARIANT_UINT = 0x17,
131         MONO_VARIANT_VOID = 0x18,
132         MONO_VARIANT_HRESULT = 0x19,
133         MONO_VARIANT_PTR = 0x1a,
134         MONO_VARIANT_SAFEARRAY = 0x1b,
135         MONO_VARIANT_CARRAY = 0x1c,
136         MONO_VARIANT_USERDEFINED = 0x1d,
137         MONO_VARIANT_LPSTR = 0x1e,
138         MONO_VARIANT_LPWSTR = 0x1f,
139         MONO_VARIANT_RECORD = 0x24,
140         MONO_VARIANT_FILETIME = 0x40,
141         MONO_VARIANT_BLOB = 0x41,
142         MONO_VARIANT_STREAM = 0x42,
143         MONO_VARIANT_STORAGE = 0x43,
144         MONO_VARIANT_STREAMED_OBJECT = 0x44,
145         MONO_VARIANT_STORED_OBJECT = 0x45,
146         MONO_VARIANT_BLOB_OBJECT = 0x46,
147         MONO_VARIANT_CF = 0x47,
148         MONO_VARIANT_CLSID = 0x48,
149         MONO_VARIANT_VECTOR = 0x1000,
150         MONO_VARIANT_ARRAY = 0x2000,
151         MONO_VARIANT_BYREF = 0x4000
152 } MonoMarshalVariant;
153
154 typedef enum {
155         MONO_MARSHAL_CONV_NONE,
156         MONO_MARSHAL_CONV_BOOL_VARIANTBOOL,
157         MONO_MARSHAL_CONV_BOOL_I4,
158         MONO_MARSHAL_CONV_STR_BSTR,
159         MONO_MARSHAL_CONV_STR_LPSTR,
160         MONO_MARSHAL_CONV_LPSTR_STR,
161         MONO_MARSHAL_CONV_LPTSTR_STR,
162         MONO_MARSHAL_CONV_STR_LPWSTR,
163         MONO_MARSHAL_CONV_LPWSTR_STR,
164         MONO_MARSHAL_CONV_STR_LPTSTR,
165         MONO_MARSHAL_CONV_STR_ANSIBSTR,
166         MONO_MARSHAL_CONV_STR_TBSTR,
167         MONO_MARSHAL_CONV_STR_BYVALSTR,
168         MONO_MARSHAL_CONV_STR_BYVALWSTR,
169         MONO_MARSHAL_CONV_SB_LPSTR,
170         MONO_MARSHAL_CONV_SB_LPTSTR,
171         MONO_MARSHAL_CONV_SB_LPWSTR,
172         MONO_MARSHAL_CONV_LPSTR_SB,
173         MONO_MARSHAL_CONV_LPTSTR_SB,
174         MONO_MARSHAL_CONV_LPWSTR_SB,
175         MONO_MARSHAL_CONV_ARRAY_BYVALARRAY,
176         MONO_MARSHAL_CONV_ARRAY_BYVALCHARARRAY,
177         MONO_MARSHAL_CONV_ARRAY_SAVEARRAY,
178         MONO_MARSHAL_CONV_ARRAY_LPARRAY,
179         MONO_MARSHAL_FREE_LPARRAY,
180         MONO_MARSHAL_CONV_OBJECT_INTERFACE,
181         MONO_MARSHAL_CONV_OBJECT_IDISPATCH,
182         MONO_MARSHAL_CONV_OBJECT_IUNKNOWN,
183         MONO_MARSHAL_CONV_OBJECT_STRUCT,
184         MONO_MARSHAL_CONV_DEL_FTN,
185         MONO_MARSHAL_CONV_FTN_DEL,
186         MONO_MARSHAL_FREE_ARRAY,
187         MONO_MARSHAL_CONV_BSTR_STR,
188         MONO_MARSHAL_CONV_SAFEHANDLE,
189         MONO_MARSHAL_CONV_HANDLEREF
190 } MonoMarshalConv;
191
192 typedef struct {
193         MonoMarshalNative native;
194         union {
195                 struct {
196                         MonoMarshalNative elem_type;
197                         int32_t num_elem; /* -1 if not set */
198                         int16_t param_num; /* -1 if not set */
199                         int16_t elem_mult; /* -1 if not set */
200                 } array_data;
201                 struct {
202                         char *custom_name;
203                         char *cookie;
204                 } custom_data;
205                 struct {
206                         MonoMarshalVariant elem_type;
207                         int32_t num_elem;
208                 } safearray_data;
209         } data;
210 } MonoMarshalSpec;
211
212 void         mono_metadata_init (void);
213
214 void         mono_metadata_decode_row (const MonoTableInfo   *t,
215                                        int                    idx,
216                                        uint32_t               *res,
217                                        int                    res_size);
218
219 uint32_t      mono_metadata_decode_row_col (const MonoTableInfo *t, 
220                                            int            idx, 
221                                            unsigned int          col);
222
223 /*
224  * This macro is used to extract the size of the table encoded in
225  * the size_bitfield of MonoTableInfo.
226  */
227 #define mono_metadata_table_size(bitfield,table) ((((bitfield) >> ((table)*2)) & 0x3) + 1)
228 #define mono_metadata_table_count(bitfield) ((bitfield) >> 24)
229
230 int mono_metadata_compute_size (MonoImage   *meta,
231                                 int             tableindex,
232                                 uint32_t        *result_bitfield);
233
234 /*
235  *
236  */
237 const char    *mono_metadata_locate        (MonoImage *meta, int table, int idx);
238 const char    *mono_metadata_locate_token  (MonoImage *meta, uint32_t token);
239                                            
240 const char    *mono_metadata_string_heap   (MonoImage *meta, uint32_t table_index);
241 const char    *mono_metadata_blob_heap     (MonoImage *meta, uint32_t table_index);
242 const char    *mono_metadata_user_string   (MonoImage *meta, uint32_t table_index);
243 const char    *mono_metadata_guid_heap     (MonoImage *meta, uint32_t table_index);
244
245 uint32_t mono_metadata_typedef_from_field  (MonoImage *meta, uint32_t table_index);
246 uint32_t mono_metadata_typedef_from_method (MonoImage *meta, uint32_t table_index);
247 uint32_t mono_metadata_nested_in_typedef   (MonoImage *meta, uint32_t table_index);
248 uint32_t mono_metadata_nesting_typedef     (MonoImage *meta, uint32_t table_index, uint32_t start_index);
249
250 MonoClass** mono_metadata_interfaces_from_typedef (MonoImage *meta, uint32_t table_index, unsigned int *count);
251
252 uint32_t     mono_metadata_events_from_typedef     (MonoImage *meta, uint32_t table_index, unsigned int *end_idx);
253 uint32_t     mono_metadata_methods_from_event      (MonoImage *meta, uint32_t table_index, unsigned int *end);
254 uint32_t     mono_metadata_properties_from_typedef (MonoImage *meta, uint32_t table_index, unsigned int *end);
255 uint32_t     mono_metadata_methods_from_property   (MonoImage *meta, uint32_t table_index, unsigned int *end);
256 uint32_t     mono_metadata_packing_from_typedef    (MonoImage *meta, uint32_t table_index, uint32_t *packing, uint32_t *size);
257 const char* mono_metadata_get_marshal_info        (MonoImage *meta, uint32_t idx, mono_bool is_field);
258 uint32_t     mono_metadata_custom_attrs_from_index (MonoImage *meta, uint32_t cattr_index);
259
260 MonoMarshalSpec *mono_metadata_parse_marshal_spec (MonoImage *image, const char *ptr);
261
262 void mono_metadata_free_marshal_spec (MonoMarshalSpec *spec);
263
264 uint32_t     mono_metadata_implmap_from_method     (MonoImage *meta, uint32_t method_idx);
265
266 void        mono_metadata_field_info (MonoImage *meta, 
267                                       uint32_t       table_index,
268                                       uint32_t      *offset,
269                                       uint32_t      *rva,
270                                       MonoMarshalSpec **marshal_spec);
271
272 uint32_t     mono_metadata_get_constant_index (MonoImage *meta, uint32_t token, uint32_t hint);
273
274 /*
275  * Functions to extract information from the Blobs
276  */
277 uint32_t mono_metadata_decode_value     (const char            *ptr,
278                                         const char           **rptr);
279 int32_t mono_metadata_decode_signed_value (const char *ptr, const char **rptr);
280
281 uint32_t mono_metadata_decode_blob_size (const char            *ptr,
282                                         const char           **rptr);
283
284 void mono_metadata_encode_value (uint32_t value, char *bug, char **endbuf);
285
286 #define MONO_OFFSET_IN_CLAUSE(clause,offset) \
287         ((clause)->try_offset <= (offset) && (offset) < ((clause)->try_offset + (clause)->try_len))
288 #define MONO_OFFSET_IN_HANDLER(clause,offset) \
289         ((clause)->handler_offset <= (offset) && (offset) < ((clause)->handler_offset + (clause)->handler_len))
290 #define MONO_OFFSET_IN_FILTER(clause,offset) \
291         ((clause)->flags == MONO_EXCEPTION_CLAUSE_FILTER && (clause)->data.filter_offset <= (offset) && (offset) < ((clause)->handler_offset))
292
293 typedef struct {
294         uint32_t flags;
295         uint32_t try_offset;
296         uint32_t try_len;
297         uint32_t handler_offset;
298         uint32_t handler_len;
299         union {
300                 uint32_t filter_offset;
301                 MonoClass *catch_class;
302         } data;
303 } MonoExceptionClause;
304
305 typedef struct _MonoType MonoType;
306 typedef struct _MonoGenericInst MonoGenericInst;
307 typedef struct _MonoGenericClass MonoGenericClass;
308 typedef struct _MonoDynamicGenericClass MonoDynamicGenericClass;
309 typedef struct _MonoGenericContext MonoGenericContext;
310 typedef struct _MonoGenericContainer MonoGenericContainer;
311 typedef struct _MonoGenericParam MonoGenericParam;
312 typedef struct _MonoArrayType MonoArrayType;
313 typedef struct _MonoMethodSignature MonoMethodSignature;
314
315 /* FIXME: Keeping this name alive for now, since it is part of the exposed API, even though no entrypoint uses it.  */
316 typedef struct invalid_name MonoGenericMethod;
317
318 typedef struct {
319         unsigned int required : 1;
320         unsigned int token    : 31;
321 } MonoCustomMod;
322
323 struct _MonoArrayType {
324         MonoClass *eklass;
325         uint8_t rank;
326         uint8_t numsizes;
327         uint8_t numlobounds;
328         int *sizes;
329         int *lobounds;
330 };
331
332 typedef struct _MonoMethodHeader MonoMethodHeader;
333
334 typedef enum {
335         MONO_PARSE_TYPE,
336         MONO_PARSE_MOD_TYPE,
337         MONO_PARSE_LOCAL,
338         MONO_PARSE_PARAM,
339         MONO_PARSE_RET,
340         MONO_PARSE_FIELD
341 } MonoParseTypeMode;
342
343 mono_bool
344 mono_type_is_byref       (MonoType *type);
345
346 int
347 mono_type_get_type       (MonoType *type);
348
349 /* For MONO_TYPE_FNPTR */
350 MonoMethodSignature*
351 mono_type_get_signature  (MonoType *type);
352
353 /* For MONO_TYPE_CLASS, VALUETYPE */
354 MonoClass*
355 mono_type_get_class      (MonoType *type);
356
357 MonoArrayType*
358 mono_type_get_array_type (MonoType *type);
359
360 /* For MONO_TYPE_PTR */
361 MonoType*
362 mono_type_get_ptr_type (MonoType *type);
363
364 MonoClass*
365 mono_type_get_modifiers  (MonoType *type, mono_bool *is_required, void **iter);
366
367 MonoType*
368 mono_signature_get_return_type (MonoMethodSignature *sig);
369
370 MonoType*
371 mono_signature_get_params      (MonoMethodSignature *sig, void **iter);
372
373 uint32_t
374 mono_signature_get_param_count (MonoMethodSignature *sig);
375
376 uint32_t
377 mono_signature_get_call_conv   (MonoMethodSignature *sig);
378
379 int
380 mono_signature_vararg_start    (MonoMethodSignature *sig);
381
382 mono_bool
383 mono_signature_is_instance     (MonoMethodSignature *sig);
384
385 mono_bool
386 mono_signature_explicit_this   (MonoMethodSignature *sig);
387
388 uint32_t     mono_metadata_parse_typedef_or_ref (MonoImage      *m,
389                                                 const char      *ptr,
390                                                 const char     **rptr);
391 int            mono_metadata_parse_custom_mod  (MonoImage      *m,
392                                                 MonoCustomMod   *dest,
393                                                 const char      *ptr,
394                                                 const char     **rptr);
395 MonoArrayType *mono_metadata_parse_array       (MonoImage      *m,
396                                                 const char      *ptr,
397                                                 const char     **rptr);
398 void           mono_metadata_free_array        (MonoArrayType     *array);
399 MonoType      *mono_metadata_parse_type        (MonoImage      *m,
400                                                 MonoParseTypeMode  mode,
401                                                 short              opt_attrs,
402                                                 const char        *ptr,
403                                                 const char       **rptr);
404 MonoType      *mono_metadata_parse_param       (MonoImage      *m,
405                                                 const char      *ptr,
406                                                 const char      **rptr);
407 MonoType      *mono_metadata_parse_ret_type    (MonoImage      *m,
408                                                 const char      *ptr,
409                                                 const char      **rptr);
410 MonoType      *mono_metadata_parse_field_type  (MonoImage      *m,
411                                                 short            field_flags,
412                                                 const char      *ptr,
413                                                 const char      **rptr);
414 MonoType      *mono_type_create_from_typespec  (MonoImage        *image, 
415                                                 uint32_t           type_spec);
416 void           mono_metadata_free_type         (MonoType        *type);
417 int            mono_type_size                  (MonoType        *type, 
418                                                 int             *alignment);
419 int            mono_type_stack_size            (MonoType        *type, 
420                                                 int             *alignment);
421
422 mono_bool       mono_type_generic_inst_is_valuetype      (MonoType *type);
423 mono_bool       mono_metadata_generic_class_is_valuetype (MonoGenericClass *gclass);
424 unsigned int          mono_metadata_generic_class_hash  (MonoGenericClass *gclass);
425 mono_bool       mono_metadata_generic_class_equal (MonoGenericClass *g1, MonoGenericClass *g2);
426
427 unsigned int          mono_metadata_type_hash         (MonoType *t1);
428 mono_bool       mono_metadata_type_equal        (MonoType *t1, MonoType *t2);
429
430 MonoMethodSignature  *mono_metadata_signature_alloc (MonoImage *image, uint32_t nparams);
431
432 MonoMethodSignature  *mono_metadata_signature_dup (MonoMethodSignature *sig);
433
434 MonoMethodSignature  *mono_metadata_parse_signature (MonoImage *image, 
435                                                      uint32_t    token);
436
437 MonoMethodSignature  *mono_metadata_parse_method_signature (MonoImage            *m,
438                                                             int                    def,
439                                                             const char            *ptr,
440                                                             const char           **rptr);
441 void                  mono_metadata_free_method_signature  (MonoMethodSignature   *method);
442
443 mono_bool          mono_metadata_signature_equal (MonoMethodSignature *sig1, 
444                                                  MonoMethodSignature *sig2);
445
446 unsigned int             mono_signature_hash (MonoMethodSignature *sig);
447
448 MonoMethodHeader *mono_metadata_parse_mh (MonoImage *m, const char *ptr);
449 void              mono_metadata_free_mh  (MonoMethodHeader *mh);
450
451 /* MonoMethodHeader acccessors */
452 const unsigned char*
453 mono_method_header_get_code (MonoMethodHeader *header, uint32_t* code_size, uint32_t* max_stack);
454
455 MonoType**
456 mono_method_header_get_locals (MonoMethodHeader *header, uint32_t* num_locals, mono_bool *init_locals);
457
458 int
459 mono_method_header_get_num_clauses (MonoMethodHeader *header);
460
461 int
462 mono_method_header_get_clauses (MonoMethodHeader *header, MonoMethod *method, void **iter, MonoExceptionClause *clause);
463
464 uint32_t 
465 mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec, 
466                         mono_bool as_field, mono_bool unicode, MonoMarshalConv *conv);
467
468 /*
469  * Makes a token based on a table and an index
470  */
471 #define mono_metadata_make_token(table,idx) (((table) << 24)| (idx))
472
473 /*
474  * Returns the table index that this token encodes.
475  */
476 #define mono_metadata_token_table(token) ((token) >> 24)
477
478  /*
479  * Returns the index that a token refers to
480  */
481 #define mono_metadata_token_index(token) ((token & 0xffffff))
482
483
484 #define mono_metadata_token_code(token) ((token & 0xff000000))
485
486 uint32_t mono_metadata_token_from_dor (uint32_t dor_index);
487
488 char *mono_guid_to_string (const uint8_t *guid);
489
490 uint32_t mono_metadata_declsec_from_index (MonoImage *meta, uint32_t idx);
491
492 uint32_t mono_metadata_translate_token_index (MonoImage *image, int table, uint32_t idx);
493
494 void    mono_metadata_decode_table_row (MonoImage *image, int table,
495                                        int                    idx,
496                                        uint32_t               *res,
497                                        int                    res_size);
498
499 uint32_t      mono_metadata_decode_table_row_col (MonoImage *image, int table,
500                                            int            idx, 
501                                            unsigned int          col);
502
503 MONO_END_DECLS
504
505 #endif /* __MONO_METADATA_H__ */