summaryrefslogtreecommitdiff
path: root/src/analysis/types/expr.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-10-18 21:24:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-10-18 21:24:25 (GMT)
commit39f8a5c2a48a209507dbc3fd407052999954a199 (patch)
tree1dc29f7ddab258242c397e4a29a41913b5b24f66 /src/analysis/types/expr.c
parentf340a5d363c55d77aca047b6dd85dfaaae02bb6d (diff)
Updated the code for the types built from expressions.
Diffstat (limited to 'src/analysis/types/expr.c')
-rw-r--r--src/analysis/types/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/analysis/types/expr.c b/src/analysis/types/expr.c
index 376b0b4..02005f4 100644
--- a/src/analysis/types/expr.c
+++ b/src/analysis/types/expr.c
@@ -175,13 +175,13 @@ static void g_expr_type_finalize(GExprType *type)
* *
******************************************************************************/
-GDataType *g_expr_type_new(char *value)
+GDataType *g_expr_type_new(const char *value)
{
GExprType *result; /* Structure à retourner */
result = g_object_new(G_TYPE_EXPR_TYPE, NULL);
- result->value = value;
+ result->value = strdup(value);
return G_DATA_TYPE(result);
@@ -204,7 +204,7 @@ static GDataType *g_expr_type_dup(const GExprType *type)
{
GDataType *result; /* Copie à retourner */
- result = g_expr_type_new(strdup(type->value));
+ result = g_expr_type_new(type->value);
return result;