From 1f047d9f74bad662e21d8220f3ad997d566e1db8 Mon Sep 17 00:00:00 2001
From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com>
Date: Tue, 17 Mar 2015 05:32:13 +0100
Subject: [PATCH] Tests run now, all fail, I'm doing something wrong

---
 src/bindings/lua/hammer.lua | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/bindings/lua/hammer.lua b/src/bindings/lua/hammer.lua
index 8f8ede55..c0b99ad3 100644
--- a/src/bindings/lua/hammer.lua
+++ b/src/bindings/lua/hammer.lua
@@ -1,10 +1,5 @@
 local ffi = require("ffi")
 ffi.cdef[[
-static const BYTE_BIG_ENDIAN = 0x1
-static const BIT_BIG_ENDIAN = 0x2
-static const BYTE_LITTLE_ENDIAN = 0x0
-static const BIT_LITTLE_ENDIAN = 0x0
-
 typedef enum HParserBackend_ {
   PB_MIN = 0,
   PB_PACKRAT = PB_MIN, // PB_MIN is always the default.
@@ -74,6 +69,8 @@ typedef struct HParser_ {
   HCFChoice *desugared;
 } HParser;
 
+typedef struct HAllocator_ HAllocator;
+
 typedef HParsedToken* (*HAction)(const HParseResult *p, void* user_data);
 typedef bool (*HPredicate)(HParseResult *p, void* user_data);
 typedef HParser* (*HContinuation)(HAllocator *mm__, const HParsedToken *x, void *env);
@@ -127,6 +124,11 @@ HParser* h_get_value(const char* name);
 HParser* h_bind(const HParser *p, HContinuation k, void *env);
 
 int h_compile(HParser* parser, HParserBackend backend, const void* params);
+
+static const uint8_t BYTE_BIG_ENDIAN = 0x1;
+static const uint8_t BIT_BIG_ENDIAN = 0x2;
+static const uint8_t BYTE_LITTLE_ENDIAN = 0x0;
+static const uint8_t BIT_LITTLE_ENDIAN = 0x0;
 ]]
 local h = ffi.load("hammer")
 
-- 
GitLab