Преглед на файлове

'setkey' -> 'setnodekey' (to avoid conflicts with POSIX)

Roberto Ierusalimschy преди 10 години
родител
ревизия
3c55790ebe
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 2 2
      lobject.h
  2. 2 2
      ltable.c

+ 2 - 2
lobject.h

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lobject.h,v 2.104 2014/10/25 11:50:46 roberto Exp roberto $
+** $Id: lobject.h,v 2.105 2014/12/19 13:36:32 roberto Exp roberto $
 ** Type definitions for Lua objects
 ** Type definitions for Lua objects
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -473,7 +473,7 @@ typedef union TKey {
 
 
 
 
 /* copy a value into a key without messing up field 'next' */
 /* copy a value into a key without messing up field 'next' */
-#define setkey(L,key,obj) \
+#define setnodekey(L,key,obj) \
 	{ TKey *k_=(key); const TValue *io_=(obj); \
 	{ TKey *k_=(key); const TValue *io_=(obj); \
 	  k_->nk.value_ = io_->value_; k_->nk.tt_ = io_->tt_; \
 	  k_->nk.value_ = io_->value_; k_->nk.tt_ = io_->tt_; \
 	  (void)L; checkliveness(G(L),io_); }
 	  (void)L; checkliveness(G(L),io_); }

+ 2 - 2
ltable.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: ltable.c,v 2.98 2014/10/25 11:50:46 roberto Exp roberto $
+** $Id: ltable.c,v 2.99 2014/11/02 19:19:04 roberto Exp roberto $
 ** Lua tables (hash)
 ** Lua tables (hash)
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -484,7 +484,7 @@ TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) {
       mp = f;
       mp = f;
     }
     }
   }
   }
-  setkey(L, &mp->i_key, key);
+  setnodekey(L, &mp->i_key, key);
   luaC_barrierback(L, t, key);
   luaC_barrierback(L, t, key);
   lua_assert(ttisnil(gval(mp)));
   lua_assert(ttisnil(gval(mp)));
   return gval(mp);
   return gval(mp);