summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_if.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-09-22 12:51:08 +0200
committerMichal Krol <[email protected]>2009-09-22 12:51:08 +0200
commit0481e85af7195e13c30580afba233a80feeee740 (patch)
tree6c9d69005a67424d41b6a1a04c9ab1dee087b796 /src/glsl/pp/sl_pp_if.c
parentbb32b0908ff0d3a99758abd46356676fc1ec2369 (diff)
glsl/pp: Differentiate between integer and floating-point number tokens.
Diffstat (limited to 'src/glsl/pp/sl_pp_if.c')
-rw-r--r--src/glsl/pp/sl_pp_if.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/pp/sl_pp_if.c b/src/glsl/pp/sl_pp_if.c
index cf1c746d5f6..5fa27fcf053 100644
--- a/src/glsl/pp/sl_pp_if.c
+++ b/src/glsl/pp/sl_pp_if.c
@@ -81,13 +81,13 @@ _parse_defined(struct sl_pp_context *context,
(*pi)++;
}
- result.token = SL_PP_NUMBER;
+ result.token = SL_PP_UINT;
if (defined) {
- result.data.number = sl_pp_context_add_unique_str(context, "1");
+ result.data._uint = sl_pp_context_add_unique_str(context, "1");
} else {
- result.data.number = sl_pp_context_add_unique_str(context, "0");
+ result.data._uint = sl_pp_context_add_unique_str(context, "0");
}
- if (result.data.number == -1) {
+ if (result.data._uint == -1) {
return -1;
}