#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) */
#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>
* Read an S-Expression from the given string.
* Advances the supplied pointer to just after the expression read.
*
- * Any allocation will be performed with 'ctx' as the talloc owner.
+ * Any allocation will be performed with 'ctx' as the ralloc owner.
*/
static s_expression *read_expression(void *ctx, const char *&src);
void print();
private:
- char *str;
+ const char *str;
};
/* Lists of expressions: (expr1 ... exprN) */