aboutsummaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorWaldemar Celes <celes@tecgraf.puc-rio.br>1994-08-17 14:41:23 -0300
committerWaldemar Celes <celes@tecgraf.puc-rio.br>1994-08-17 14:41:23 -0300
commita4eeb099c8be2ca2608bfec7232da878549288f0 (patch)
tree407bf404a19cfe31a09f2975648a9a1ee67887f8 /hash.c
parentc364c7286fc99f306982acb9f184629126ca6889 (diff)
downloadlua-a4eeb099c8be2ca2608bfec7232da878549288f0.tar.gz
lua-a4eeb099c8be2ca2608bfec7232da878549288f0.tar.bz2
lua-a4eeb099c8be2ca2608bfec7232da878549288f0.zip
Alteracao na macro 'streq'
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index d54550e8..de74dab5 100644
--- a/hash.c
+++ b/hash.c
@@ -3,7 +3,7 @@
3** hash manager for lua 3** hash manager for lua
4*/ 4*/
5 5
6char *rcs_hash="$Id: hash.c,v 2.4 1994/08/09 11:24:45 celes Exp celes $"; 6char *rcs_hash="$Id: hash.c,v 2.5 1994/08/17 15:03:11 celes Exp $";
7 7
8#include <string.h> 8#include <string.h>
9#include <stdlib.h> 9#include <stdlib.h>
@@ -16,7 +16,7 @@ char *rcs_hash="$Id: hash.c,v 2.4 1994/08/09 11:24:45 celes Exp celes $";
16#include "table.h" 16#include "table.h"
17#include "lua.h" 17#include "lua.h"
18 18
19#define streq(s1,s2) (*(s1) == *(s2) && strcmp(s1,s2)==0) 19#define streq(s1,s2) (s1 == s2 || (*(s1) == *(s2) && strcmp(s1,s2)==0))
20 20
21#define new(s) ((s *)malloc(sizeof(s))) 21#define new(s) ((s *)malloc(sizeof(s)))
22#define newvector(n,s) ((s *)calloc(n,sizeof(s))) 22#define newvector(n,s) ((s *)calloc(n,sizeof(s)))