diff --git a/hslua.cabal b/hslua.cabal
--- a/hslua.cabal
+++ b/hslua.cabal
@@ -1,5 +1,5 @@
 Name: hslua
-Version: 0.3.3
+Version: 0.3.4
 Stability: beta
 Cabal-version: >= 1.6
 License: BSD3
diff --git a/src/Scripting/Lua.hs b/src/Scripting/Lua.hs
--- a/src/Scripting/Lua.hs
+++ b/src/Scripting/Lua.hs
@@ -190,12 +190,12 @@
 -- | Wrapper for @lua_State *@. See @lua_State@ in Lua Reference Manual.
 newtype LuaState = LuaState (Ptr ())
 -- | Wrapper for @lua_Alloc@. See @lua_Alloc@ in Lua Reference Manual.
-type LuaAlloc = Ptr () -> Ptr () -> CInt -> CInt -> IO (Ptr ())
+type LuaAlloc = Ptr () -> Ptr () -> CSize -> CSize -> IO (Ptr ())
 -- | Wrapper for @lua_Reader@. See @lua_Reader@ in Lua Reference Manual.
-type LuaReader = Ptr () -> Ptr () -> Ptr CInt -> IO (Ptr CChar)
+type LuaReader = Ptr () -> Ptr () -> Ptr CSize -> IO (Ptr CChar)
 
 -- | Wrapper for @lua_Writer@. See @lua_Writer@ in Lua Reference Manual.
-type LuaWriter = LuaState -> Ptr CChar -> CInt -> Ptr () -> IO CInt
+type LuaWriter = LuaState -> Ptr CChar -> CSize -> Ptr () -> IO CInt
 -- | Wrapper for @lua_CFunction@. See @lua_CFunction@ in Lua Reference Manual.
 type LuaCFunction = LuaState -> IO CInt
 -- | Wrapper for @lua_Integer@. See @lua_Integer@ in Lua Reference Manual.
