Skip to content

Commit

Permalink
Fix alignments
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraRozier committed Nov 8, 2020
1 parent 662046f commit 799f42d
Show file tree
Hide file tree
Showing 4 changed files with 443 additions and 455 deletions.
92 changes: 46 additions & 46 deletions lua53-beef/src/lauxlib.bf
Original file line number Diff line number Diff line change
Expand Up @@ -332,18 +332,18 @@ namespace lua53_beef
/* }====================================================== */

/* compatibility with old module system */
#if LUA_COMPAT_MODULE
[Import(lua.LIB_DLL), LinkName("luaL_pushmodule")]
public static extern void pushmodule(lua_State* L, char8* modname, int sizehint);
[Import(lua.LIB_DLL), LinkName("luaL_openlib")]
public static extern void openlib(lua_State* L, char8* libname, luaL_Reg* l, int nup);

[Inline]
public static void register(lua_State* L, char8* n, luaL_Reg* l)
{
openlib(L, n, l, 0);
}
#endif
#if LUA_COMPAT_MODULE
[Import(lua.LIB_DLL), LinkName("luaL_pushmodule")]
public static extern void pushmodule(lua_State* L, char8* modname, int sizehint);
[Import(lua.LIB_DLL), LinkName("luaL_openlib")]
public static extern void openlib(lua_State* L, char8* libname, luaL_Reg* l, int nup);

[Inline]
public static void register(lua_State* L, char8* n, luaL_Reg* l)
{
openlib(L, n, l, 0);
}
#endif

/* }================================================================== */

Expand Down Expand Up @@ -382,40 +382,40 @@ namespace lua53_beef
** =============================================================
*/

#if LUA_COMPAT_APIINTCASTS
[Inline]
public static lua_Unsigned checkunsigned(lua_State* L, int idx)
{
return (lua_Unsigned)checkinteger(L, idx);
}
[Inline]
public static lua_Unsigned optunsigned(lua_State* L, int idx, lua_Unsigned def)
{
return (lua_Unsigned)optinteger(L, idx, (lua_Integer)def);
}

[Inline]
public static int checkint(lua_State* L, int idx)
{
return (int)checkinteger(L, idx);
}
[Inline]
public static int optint(lua_State* L, int idx, int def)
{
return (int)optinteger(L, idx, def);
}

[Inline]
public static int64 checklong(lua_State* L, int idx)
{
return (int64)checkinteger(L, idx);
}
[Inline]
public static int64 optlong(lua_State* L, int idx, int64 def)
{
return (int64)optinteger(L, idx, def);
}
#endif
#if LUA_COMPAT_APIINTCASTS
[Inline]
public static lua_Unsigned checkunsigned(lua_State* L, int idx)
{
return (lua_Unsigned)checkinteger(L, idx);
}
[Inline]
public static lua_Unsigned optunsigned(lua_State* L, int idx, lua_Unsigned def)
{
return (lua_Unsigned)optinteger(L, idx, (lua_Integer)def);
}

[Inline]
public static int checkint(lua_State* L, int idx)
{
return (int)checkinteger(L, idx);
}
[Inline]
public static int optint(lua_State* L, int idx, int def)
{
return (int)optinteger(L, idx, def);
}

[Inline]
public static int64 checklong(lua_State* L, int idx)
{
return (int64)checkinteger(L, idx);
}
[Inline]
public static int64 optlong(lua_State* L, int idx, int64 def)
{
return (int64)optinteger(L, idx, def);
}
#endif

/* }============================================================ */
}
Expand Down
Loading

0 comments on commit 799f42d

Please sign in to comment.