Skip to content

Commit

Permalink
Add. try.newtry as synonym for try.new for compatibility with Lua…
Browse files Browse the repository at this point in the history
…Socket.
  • Loading branch information
moteus committed Nov 11, 2014
1 parent 88d09cc commit a779c19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/try.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
static const char *TRY_ERROR_IDX = "Dummy";
static const char *TRY_ERROR_NIL = "NIL";


/*=========================================================================*\
* Internal function prototypes.
\*=========================================================================*/
Expand All @@ -28,6 +27,9 @@ static int try_new_protect(lua_State *L);
static luaL_Reg func[] = {
{"new", try_new_assert},
{"protect", try_new_protect},

/* compat with LuaSocket */
{"newtry", try_new_assert},
{NULL, NULL}
};

Expand Down

0 comments on commit a779c19

Please sign in to comment.