1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/devel/lua-pty/files/patch-pty.c
Philip Paeps 463177d875 Add devel/lua-pty to work with Lua 5.0 and Lua 5.1 and turn devel/lua50-pty
into a slave port of it.

PR:		ports/106347
Submitted by:	Andrew Turner <andrew+ports@fubar.geek.nz> (maintainer)
Repocopy by:	marcus
2006-12-05 22:51:12 +00:00

19 lines
413 B
C

--- pty.c.orig Wed Nov 29 21:26:24 2006
+++ pty.c Wed Nov 29 21:29:38 2006
@@ -66,6 +66,15 @@
#define WEXIT_TYPE union wait
#endif
+#ifndef lua_boxpointer
+#define lua_boxpointer(L,u) \
+ (*(void **)(lua_newuserdata(L, sizeof(void *))) = (u))
+#endif
+
+#ifndef lua_unboxpointer
+#define lua_unboxpointer(L,i) (*(void **)(lua_touserdata(L, i)))
+#endif
+
struct lua_pty {
FILE *stream;
pid_t child;