diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-10-13 21:24:12 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-10-13 21:24:12 (GMT) |
commit | 362ff8ddd7fac8a10c7cccae303d2ce5ea6dd7f2 (patch) | |
tree | 5994c98dd314333be5d1a7cbf34ccec93efba83e /src | |
parent | 15ca338693167373102f5a44c2694c0adc26d820 (diff) |
Defined proper Python bindings for basic types.
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/types/basic.c | 8 | ||||
-rw-r--r-- | src/analysis/types/basic.h | 2 | ||||
-rw-r--r-- | src/analysis/types/literal.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/analysis/types/basic.c b/src/analysis/types/basic.c index 755a6f6..a907f2d 100644 --- a/src/analysis/types/basic.c +++ b/src/analysis/types/basic.c @@ -371,8 +371,12 @@ static char *g_basic_type_to_string(const GBasicType *type, bool include) * * ******************************************************************************/ -BaseType g_basic_type_get_base_type(const GBasicType *type) +BaseType g_basic_type_get_base(const GBasicType *type) { - return type->type; + BaseType result; /* Type de base à retourner */ + + result = type->type; + + return result; } diff --git a/src/analysis/types/basic.h b/src/analysis/types/basic.h index d2b3055..ad7308f 100644 --- a/src/analysis/types/basic.h +++ b/src/analysis/types/basic.h @@ -93,7 +93,7 @@ GType g_basic_type_get_type(void); GDataType *g_basic_type_new(BaseType); /* Fournit le type de base géré par le type. */ -BaseType g_basic_type_get_base_type(const GBasicType *); +BaseType g_basic_type_get_base(const GBasicType *); diff --git a/src/analysis/types/literal.c b/src/analysis/types/literal.c index 831fcb7..3a9e5cf 100644 --- a/src/analysis/types/literal.c +++ b/src/analysis/types/literal.c @@ -243,7 +243,7 @@ static char *g_literal_type_to_string(const GLiteralType *type, bool include) { char *result; /* Valeur à renvoyer */ - switch (g_basic_type_get_base_type(G_BASIC_TYPE(type->orig))) + switch (g_basic_type_get_base(G_BASIC_TYPE(type->orig))) { case BTP_BOOL: result = strdup(type->value.int_val ? "true" : "false"); |