mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
first step in implementing internal methods.
This commit is contained in:
parent
bbf1b3060a
commit
131d66efd2
10 changed files with 441 additions and 236 deletions
5
hash.c
5
hash.c
|
|
@ -3,7 +3,7 @@
|
|||
** hash manager for lua
|
||||
*/
|
||||
|
||||
char *rcs_hash="$Id: hash.c,v 2.32 1996/11/18 13:48:44 roberto Exp roberto $";
|
||||
char *rcs_hash="$Id: hash.c,v 2.33 1997/02/11 11:35:05 roberto Exp roberto $";
|
||||
|
||||
|
||||
#include "mem.h"
|
||||
|
|
@ -24,6 +24,8 @@ char *rcs_hash="$Id: hash.c,v 2.32 1996/11/18 13:48:44 roberto Exp roberto $";
|
|||
|
||||
#define REHASH_LIMIT 0.70 /* avoid more than this % full */
|
||||
|
||||
#define TagDefault LUA_T_ARRAY;
|
||||
|
||||
|
||||
static Hash *listhead = NULL;
|
||||
|
||||
|
|
@ -121,6 +123,7 @@ static Hash *hashcreate (int nhash)
|
|||
nhash(t) = nhash;
|
||||
nuse(t) = 0;
|
||||
markarray(t) = 0;
|
||||
t->htag = TagDefault;
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue