Mercurial > hg-old > index.cgi
diff lwlib/lw_expr.c @ 448:5cccf90bf838 3.0 tip
Fixed bug with complex external references generating invalid relocations in the object file
author | lost@l-w.ca |
---|---|
date | Fri, 05 Nov 2010 22:27:00 -0600 |
parents | a8934dfba400 |
children |
line wrap: on
line diff
--- a/lwlib/lw_expr.c Thu Nov 04 23:25:18 2010 -0600 +++ b/lwlib/lw_expr.c Fri Nov 05 22:27:00 2010 -0600 @@ -1273,3 +1273,17 @@ { return e -> value2; } + +int lw_expr_operandcount(lw_expr_t e) +{ + int count = 0; + struct lw_expr_opers *o; + + if (e -> type != lw_expr_type_oper) + return 0; + + for (o = e -> operands; o; o = o -> next) + count++; + + return count; +}