diff options
Diffstat (limited to 'src/analysis/type-int.h')
-rw-r--r-- | src/analysis/type-int.h | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/src/analysis/type-int.h b/src/analysis/type-int.h index e14d209..d6c2588 100644 --- a/src/analysis/type-int.h +++ b/src/analysis/type-int.h @@ -29,6 +29,7 @@ #include "storage/serialize-int.h" +#include "../glibext/objhole.h" @@ -58,18 +59,61 @@ typedef bool (* type_is_reference_fc) (const GDataType *); +/* Informations glissées dans la structure GObject de GBinSymbol */ +typedef union _type_obj_extra +{ + struct + { + TypeQualifier qualifiers; /* Eventuels qualificatifs */ + char ns_sep[2]; /* Séparateur d'éléments */ + TypeFlag flags; /* Propriétés du type */ + + }; + + gint lock; /* Gestion d'accès aux fanions */ + +} type_obj_extra; + /* Description de type quelconque (instance) */ struct _GDataType { GObject parent; /* A laisser en premier */ - TypeQualifier qualifiers; /* Eventuels qualificatifs */ - GDataType *namespace; /* Espace de noms / classe */ - char *ns_sep; /* Séparateur d'éléments */ + +#if __SIZEOF_INT__ == __SIZEOF_LONG__ + + /** + * L'inclusion des informations suivantes dépend de l'architecture. + * + * Si la structure GObject possède un trou, on remplit de préférence + * ce dernier. + */ + + type_obj_extra extra; /* Externalisation embarquée */ + +#endif }; +/** + * Accès aux informations éventuellement déportées. + */ + +#if __SIZEOF_INT__ == __SIZEOF_LONG__ + +# define INIT_DATA_TYPE_EXTRA(tp) tp->extra.lock = 0 + +# define GET_DATA_TYPE_EXTRA(tp) &tp->extra + +#else + +# define INIT_DATA_TYPE_EXTRA(tp) INIT_GOBJECT_EXTRA(G_OBJECT(tp)) + +# define GET_DATA_TYPE_EXTRA(tp) GET_GOBJECT_EXTRA(G_OBJECT(tp), type_obj_extra) + +#endif + /* Description de type quelconque (classe) */ struct _GDataTypeClass { |