nir/print: Factor variable name lookup into a helper
[mesa.git] / src / glsl / s_expression.h
index c9dc676b3191a15b565927caa8a2867df20db703..f0dffb1b2f86d35422238c386e4cf46272a38a4a 100644 (file)
@@ -27,7 +27,7 @@
 #define S_EXPRESSION_H
 
 #include "main/core.h" /* for Elements */
-#include "strtod.h"
+#include "util/strtod.h"
 #include "list.h"
 
 /* Type-safe downcasting macros (also safe to pass NULL) */
@@ -39,8 +39,8 @@
 #define SX_AS_INT(x)    SX_AS_(int, x)
 
 /* Pattern matching macros */
-#define MATCH(list, pat) s_match(list, Elements(pat), pat, false)
-#define PARTIAL_MATCH(list, pat) s_match(list, Elements(pat), pat, true)
+#define MATCH(list, pat) s_match(list, ARRAY_SIZE(pat), pat, false)
+#define PARTIAL_MATCH(list, pat) s_match(list, ARRAY_SIZE(pat), pat, true)
 
 /* For our purposes, S-Expressions are:
  * - <int>
@@ -129,7 +129,7 @@ public:
    void print();
 
 private:
-   char *str;
+   const char *str;
 };
 
 /* Lists of expressions: (expr1 ... exprN) */