diff options
author | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-08-17 14:41:23 -0300 |
---|---|---|
committer | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-08-17 14:41:23 -0300 |
commit | a4eeb099c8be2ca2608bfec7232da878549288f0 (patch) | |
tree | 407bf404a19cfe31a09f2975648a9a1ee67887f8 /hash.c | |
parent | c364c7286fc99f306982acb9f184629126ca6889 (diff) | |
download | lua-a4eeb099c8be2ca2608bfec7232da878549288f0.tar.gz lua-a4eeb099c8be2ca2608bfec7232da878549288f0.tar.bz2 lua-a4eeb099c8be2ca2608bfec7232da878549288f0.zip |
Alteracao na macro 'streq'
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** hash manager for lua | 3 | ** hash manager for lua |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_hash="$Id: hash.c,v 2.4 1994/08/09 11:24:45 celes Exp celes $"; | 6 | char *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))) |