diff options
Diffstat (limited to 'src/arch/operand.c')
-rw-r--r-- | src/arch/operand.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/arch/operand.c b/src/arch/operand.c index dd28238..584e3c0 100644 --- a/src/arch/operand.c +++ b/src/arch/operand.c @@ -50,7 +50,10 @@ static void g_arch_operand_dispose(GArchOperand *); static void g_arch_operand_finalize(GArchOperand *); /* Initialise un nouvel objet partagé avec des informations. */ -static bool g_arch_operand_do_init(GArchOperand *, const void *); +static bool g_arch_operand_do_init(GArchOperand *, const GArchOperand *); + +/* Réalise une copie minimale d'un contenu partagé. */ +static void g_arch_operand_quickly_copy(const GArchOperand *, GArchOperand *); /* Fournit la valeur du compteur de partage. */ static unsigned int g_arch_operand_get_references(const GArchOperand *); @@ -65,6 +68,7 @@ static void g_arch_operand_dec_references(GArchOperand *); static int g_arch_operand_quickly_compare(const GArchOperand **, const GArchOperand **); + /* Indique le type défini pour un opérande d'architecture. */ G_DEFINE_TYPE_WITH_CODE(GArchOperand, g_arch_operand, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(G_TYPE_SHARED_INSTANCE, g_arch_operand_interface_init)); @@ -128,6 +132,7 @@ static void g_arch_operand_init(GArchOperand *operand) static void g_arch_operand_interface_init(GSharedInstanceInterface *iface) { iface->init = (init_shared_fc)g_arch_operand_do_init; + iface->qck_copy = (qck_copy_shared_fc)g_arch_operand_quickly_copy; iface->get_ref = (get_shared_ref_fc)g_arch_operand_get_references; iface->inc_ref = (inc_shared_ref_fc)g_arch_operand_inc_references; @@ -191,11 +196,11 @@ static void g_arch_operand_finalize(GArchOperand *operand) * * ******************************************************************************/ -static bool g_arch_operand_do_init(GArchOperand *operand, const void *info) +static bool g_arch_operand_do_init(GArchOperand *operand, const GArchOperand *info) { bool result; /* Bilan à retourner */ - result = G_ARCH_OPERAND_GET_CLASS(operand)->init(G_SHARED_INSTANCE(operand), info); + result = G_ARCH_OPERAND_GET_CLASS(operand)->init(operand, info); return result; @@ -204,6 +209,26 @@ static bool g_arch_operand_do_init(GArchOperand *operand, const void *info) /****************************************************************************** * * +* Paramètres : operand = objet partagé à consulter. * +* template = informations à retrouver intégralement. * +* * +* Description : Réalise une copie minimale d'un contenu partagé. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_arch_operand_quickly_copy(const GArchOperand *operand, GArchOperand *template) +{ + G_ARCH_OPERAND_GET_CLASS(operand)->qck_copy(operand, template); + +} + + +/****************************************************************************** +* * * Paramètres : operand = objet partagé à consulter. * * * * Description : Fournit la valeur du compteur de partage. * |