new macros for changing numbers

This commit is contained in:
Roberto Ierusalimschy
2001-06-28 11:48:44 -03:00
parent 61a036eaa5
commit b346834a09
2 changed files with 13 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lobject.h,v 1.106 2001/06/15 20:36:57 roberto Exp roberto $
** $Id: lobject.h,v 1.107 2001/06/26 13:20:45 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -55,6 +55,8 @@ typedef struct lua_TObject {
#define setnvalue(obj,x) \
{ TObject *_o=(obj); _o->tt=LUA_TNUMBER; _o->value.n=(x); }
#define chgnvalue(obj,x) ((obj)->value.n=(x))
#define setsvalue(obj,x) \
{ TObject *_o=(obj); _o->tt=LUA_TSTRING; _o->value.ts=(x); }