From 0e0e4a480e6d9b0125a96ca982a3e9571578a037 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 11 Apr 2001 11:42:41 -0300 Subject: first implementation for weak tables --- lua.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lua.h') diff --git a/lua.h b/lua.h index a6f32e98..6030246f 100644 --- a/lua.h +++ b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.92 2001/03/26 14:31:49 roberto Exp roberto $ +** $Id: lua.h,v 1.93 2001/04/06 21:17:37 roberto Exp roberto $ ** Lua - An Extensible Extension Language ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil ** e-mail: lua@tecgraf.puc-rio.br @@ -46,6 +46,11 @@ #define LUA_ERRMEM 4 #define LUA_ERRERR 5 +/* weak modes */ +#define LUA_WEAK_KEY 1 +#define LUA_WEAK_VALUE 2 + + typedef struct lua_State lua_State; typedef int (*lua_CFunction) (lua_State *L); @@ -208,6 +213,9 @@ LUA_API void lua_concat (lua_State *L, int n); LUA_API void *lua_newuserdata (lua_State *L, size_t size); +LUA_API void lua_setweakmode (lua_State *L, int mode); +LUA_API int lua_getweakmode (lua_State *L, int index); + /* ** =============================================================== @@ -290,7 +298,7 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size); /****************************************************************************** -* Copyright (C) 1994-2000 TeCGraf, PUC-Rio. All rights reserved. +* Copyright (C) 1994-2001 TeCGraf, PUC-Rio. All rights reserved. * * Permission is hereby granted, without written agreement and without license * or royalty fees, to use, copy, modify, and distribute this software and its -- cgit v1.2.3-55-g6feb