From: Michael Urman Date: Mon, 11 Oct 2004 03:42:08 +0000 (-0000) Subject: Deconst yasm_expr_get_intnum's return, allowing inplace modifications to X-Git-Tag: v0.4.0~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b38ea65cb191eb8071dbda4057ddcf6fb9bebb3;p=yasm Deconst yasm_expr_get_intnum's return, allowing inplace modifications to be made. The specific instigator for this is the ability to modify the value in a relocation stored in a .rela.section so that listings are "correct". svn path=/trunk/yasm/; revision=1159 --- diff --git a/libyasm/expr.c b/libyasm/expr.c index 89dce555..12120b4c 100644 --- a/libyasm/expr.c +++ b/libyasm/expr.c @@ -1130,7 +1130,7 @@ yasm_expr_extract_shr(yasm_expr **ep) } /*@-unqualifiedtrans -nullderef -nullstate -onlytrans@*/ -const yasm_intnum * +yasm_intnum * yasm_expr_get_intnum(yasm_expr **ep, yasm_calc_bc_dist_func calc_bc_dist) { *ep = yasm_expr_simplify(*ep, calc_bc_dist); diff --git a/libyasm/expr.h b/libyasm/expr.h index ab52d922..47e34550 100644 --- a/libyasm/expr.h +++ b/libyasm/expr.h @@ -224,7 +224,7 @@ SLIST_HEAD(yasm__exprhead, yasm__exprentry); * integers, ie floats, non-valued labels, registers); otherwise the * intnum value of the expression. */ -/*@dependent@*/ /*@null@*/ const yasm_intnum *yasm_expr_get_intnum +/*@dependent@*/ /*@null@*/ yasm_intnum *yasm_expr_get_intnum (yasm_expr **ep, /*@null@*/ yasm_calc_bc_dist_func calc_bc_dist); /** Get the floating point value of an expression if it's just an floatnum.