From 1ebf109c53bd3100a1593acda68afcbe86f72f6c Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 8 Jan 2010 18:00:20 -0200
Subject: 'setobj' must assing fields one by one, to allow trick of using pad
 space in table keys

---
 lobject.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'lobject.h')

diff --git a/lobject.h b/lobject.h
index 5dcfb3d3..23f1f539 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
 /*
-** $Id: lobject.h,v 2.32 2009/11/06 17:09:27 roberto Exp roberto $
+** $Id: lobject.h,v 2.33 2009/11/19 19:06:52 roberto Exp roberto $
 ** Type definitions for Lua objects
 ** See Copyright Notice in lua.h
 */
@@ -169,8 +169,10 @@ typedef struct lua_TValue {
 
 
 
-
-#define setobj(L,obj1,obj2)	{ *(obj1) = *(obj2); }
+#define setobj(L,obj1,obj2) \
+	{ const TValue *o2=(obj2); TValue *o1=(obj1); \
+	  o1->value_ = o2->value_; o1->tt_=o2->tt_; \
+	  checkliveness(G(L),o1); }
 
 
 /*
-- 
cgit v1.2.3-55-g6feb