summaryrefslogtreecommitdiff
path: root/giscanner/scannerparser.y
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-02-16 00:43:36 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-16 00:48:59 -0500
commitfa8e95cd172769c337a5945cfaa4f0aeb1d128ca (patch)
tree812dbcc5fdfeb267327661b7a4016d1b228d48d5 /giscanner/scannerparser.y
parenta21f3238c8701f79f98486101123c6de01e439ea (diff)
downloadgobject-introspection-fa8e95cd172769c337a5945cfaa4f0aeb1d128ca.tar.gz
sourcescanner: Fix symbolic references in enum members
We need to copy the source symbols, otherwise we'll overwrite their values. This isn't good. https://bugzilla.gnome.org/show_bug.cgi?id=693939
Diffstat (limited to 'giscanner/scannerparser.y')
-rw-r--r--giscanner/scannerparser.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y
index 773e9612..3457b499 100644
--- a/giscanner/scannerparser.y
+++ b/giscanner/scannerparser.y
@@ -366,15 +366,15 @@ unary_expression
$$ = $2;
break;
case UNARY_MINUS:
- $$ = $2;
+ $$ = gi_source_symbol_copy ($2);
$$->const_int = -$2->const_int;
break;
case UNARY_BITWISE_COMPLEMENT:
- $$ = $2;
+ $$ = gi_source_symbol_copy ($2);
$$->const_int = ~$2->const_int;
break;
case UNARY_LOGICAL_NEGATION:
- $$ = $2;
+ $$ = gi_source_symbol_copy ($2);
$$->const_int = !gi_source_symbol_get_const_boolean ($2);
break;
default: