summaryrefslogtreecommitdiff
path: root/src/arch/operand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/operand.c')
-rw-r--r--src/arch/operand.c74
1 files changed, 66 insertions, 8 deletions
diff --git a/src/arch/operand.c b/src/arch/operand.c
index e95f24e..0f5ffd5 100644
--- a/src/arch/operand.c
+++ b/src/arch/operand.c
@@ -69,10 +69,10 @@ static int _g_arch_operand_compare(const GArchOperand *, const GArchOperand *, b
/* Fournit une liste de candidats embarqués par un candidat. */
-static GArchOperand **g_arch_operand_list_inner_instances(const GArchOperand *, size_t *);
+GArchOperand **g_arch_operand_list_inner_instances(const GArchOperand *, size_t *);
/* Met à jour une liste de candidats embarqués par un candidat. */
-static void g_arch_operand_update_inner_instances(GArchOperand *, GArchOperand **, size_t);
+void g_arch_operand_update_inner_instances(GArchOperand *, GArchOperand **, size_t);
/* Fournit l'empreinte d'un candidat à une centralisation. */
static guint _g_arch_operand_hash(const GArchOperand *, bool);
@@ -408,6 +408,9 @@ void g_arch_operand_print(const GArchOperand *operand, GBufferLine *line)
}
+#ifdef INCLUDE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : operand = opérande à consulter. *
@@ -438,10 +441,14 @@ char *g_arch_operand_build_tooltip(const GArchOperand *operand, const GLoadedBin
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : operand = opérande à venir modifier. *
* flag = drapeau d'information complémentaire à planter. *
+* lock = indique un besoin de verrouillage des données. *
* *
* Description : Ajoute une information complémentaire à un opérande. *
* *
@@ -451,7 +458,7 @@ char *g_arch_operand_build_tooltip(const GArchOperand *operand, const GLoadedBin
* *
******************************************************************************/
-bool g_arch_operand_set_flag(GArchOperand *operand, ArchOperandFlag flag)
+bool _g_arch_operand_set_flag(GArchOperand *operand, ArchOperandFlag flag, bool lock)
{
bool result; /* Bilan à retourner */
operand_extra_data_t *extra; /* Données insérées à modifier */
@@ -460,13 +467,39 @@ bool g_arch_operand_set_flag(GArchOperand *operand, ArchOperandFlag flag)
extra = GET_ARCH_OP_EXTRA(operand);
- LOCK_GOBJECT_EXTRA(extra);
+ if (lock)
+ LOCK_GOBJECT_EXTRA(extra);
result = !(extra->flags & flag);
extra->flags |= flag;
- UNLOCK_GOBJECT_EXTRA(extra);
+ if (lock)
+ UNLOCK_GOBJECT_EXTRA(extra);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : operand = opérande à venir modifier. *
+* flag = drapeau d'information complémentaire à planter. *
+* *
+* Description : Ajoute une information complémentaire à un opérande. *
+* *
+* Retour : Bilan de l'opération. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_arch_operand_set_flag(GArchOperand *operand, ArchOperandFlag flag)
+{
+ bool result; /* Bilan à retourner */
+
+ result = _g_arch_operand_set_flag(operand, flag, true);
return result;
@@ -477,6 +510,7 @@ bool g_arch_operand_set_flag(GArchOperand *operand, ArchOperandFlag flag)
* *
* Paramètres : operand = opérande à venir modifier. *
* flag = drapeau d'information complémentaire à planter. *
+* lock = indique un besoin de verrouillage des données. *
* *
* Description : Retire une information complémentaire à un opérande. *
* *
@@ -486,7 +520,7 @@ bool g_arch_operand_set_flag(GArchOperand *operand, ArchOperandFlag flag)
* *
******************************************************************************/
-bool g_arch_operand_unset_flag(GArchOperand *operand, ArchOperandFlag flag)
+bool _g_arch_operand_unset_flag(GArchOperand *operand, ArchOperandFlag flag, bool lock)
{
bool result; /* Bilan à retourner */
operand_extra_data_t *extra; /* Données insérées à modifier */
@@ -510,6 +544,30 @@ bool g_arch_operand_unset_flag(GArchOperand *operand, ArchOperandFlag flag)
/******************************************************************************
* *
+* Paramètres : operand = opérande à venir modifier. *
+* flag = drapeau d'information complémentaire à planter. *
+* *
+* Description : Retire une information complémentaire à un opérande. *
+* *
+* Retour : Bilan de l'opération. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_arch_operand_unset_flag(GArchOperand *operand, ArchOperandFlag flag)
+{
+ bool result; /* Bilan à retourner */
+
+ result = _g_arch_operand_unset_flag(operand, flag, true);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : operand = opérande à venir consulter. *
* flag = drapeau d'information à rechercher. *
* *
@@ -590,7 +648,7 @@ ArchOperandFlag g_arch_operand_get_flags(const GArchOperand *operand)
* *
******************************************************************************/
-static GArchOperand **g_arch_operand_list_inner_instances(const GArchOperand *operand, size_t *count)
+GArchOperand **g_arch_operand_list_inner_instances(const GArchOperand *operand, size_t *count)
{
GArchOperand **result; /* Instances à retourner */
GArchOperandClass *class; /* Classe associée à l'objet */
@@ -625,7 +683,7 @@ static GArchOperand **g_arch_operand_list_inner_instances(const GArchOperand *op
* *
******************************************************************************/
-static void g_arch_operand_update_inner_instances(GArchOperand *operand, GArchOperand **instances, size_t count)
+void g_arch_operand_update_inner_instances(GArchOperand *operand, GArchOperand **instances, size_t count)
{
GArchOperandClass *class; /* Classe associée à l'objet */