diff options
Diffstat (limited to 'src/glibext')
| -rw-r--r-- | src/glibext/objhole.h | 28 | 
1 files changed, 26 insertions, 2 deletions
| diff --git a/src/glibext/objhole.h b/src/glibext/objhole.h index c256cfb..38f4bd5 100644 --- a/src/glibext/objhole.h +++ b/src/glibext/objhole.h @@ -43,11 +43,33 @@   *        GData          *qdata;   *    };   * - * L'espace entre les deux derniers champs est exploité ici. + * En revanche, le fichier "glib/gobject/gobject.c" précise la définition + * réelle de la structure selon l'environnement : + * + *    #if SIZEOF_INT == 4 && GLIB_SIZEOF_VOID_P == 8 + *    #define HAVE_OPTIONAL_FLAGS + *    #endif + * + *    typedef struct + *    { + *      GTypeInstance  g_type_instance; + *      guint          ref_count; + *    #ifdef HAVE_OPTIONAL_FLAGS + *      guint          optional_flags; + *    #endif + *      GData         *qdata; + *    } GObjectReal; + * + *    G_STATIC_ASSERT(sizeof(GObject) == sizeof(GObjectReal)); + *    G_STATIC_ASSERT(G_STRUCT_OFFSET(GObject, ref_count) == G_STRUCT_OFFSET(GObjectReal, ref_count)); + *    G_STATIC_ASSERT(G_STRUCT_OFFSET(GObject, qdata) == G_STRUCT_OFFSET(GObjectReal, qdata)); + * + * L'espace entre les deux derniers champs ne peut donc être pleinement exploité deux fois.   */ +#if 0 -#define GET_GOBJECT_EXTRA(obj, tp)                              \ +#   define GET_GOBJECT_EXTRA(obj, tp)                           \      ({                                                          \          BUILD_BUG_ON(sizeof(tp) > sizeof(guint));               \          tp *___result;                                          \ @@ -56,6 +78,8 @@          ___result;                                              \      }) +#endif +  /**   * Choix du bit de verrou pour le champ "lock". | 
