aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-09-17 12:51:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-09-17 12:51:05 -0300
commitee5edb6b680589805c8fc348f6a7566c2bd8735d (patch)
treeca0d801e40a0dcf98c4594bdaf97933193bfea71 /lobject.h
parentbda83e22c0ab3e6fffbf0a71e5e4a5869da8f6ab (diff)
downloadlua-ee5edb6b680589805c8fc348f6a7566c2bd8735d.tar.gz
lua-ee5edb6b680589805c8fc348f6a7566c2bd8735d.tar.bz2
lua-ee5edb6b680589805c8fc348f6a7566c2bd8735d.zip
macros 'getaddrstr' and 'getstr' unified (they do the same thing)
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lobject.h b/lobject.h
index aa5bf94e..e095f43f 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 2.112 2015/09/08 15:49:25 roberto Exp roberto $ 2** $Id: lobject.h,v 2.113 2015/09/08 16:54:52 roberto Exp roberto $
3** Type definitions for Lua objects 3** Type definitions for Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -325,9 +325,9 @@ typedef union UTString {
325** Get the actual string (array of bytes) from a 'TString'. 325** Get the actual string (array of bytes) from a 'TString'.
326** (Access to 'extra' ensures that value is really a 'TString'.) 326** (Access to 'extra' ensures that value is really a 'TString'.)
327*/ 327*/
328#define getaddrstr(ts) (cast(char *, (ts)) + sizeof(UTString))
329#define getstr(ts) \ 328#define getstr(ts) \
330 check_exp(sizeof((ts)->extra), cast(const char*, getaddrstr(ts))) 329 check_exp(sizeof((ts)->extra), cast(char *, (ts)) + sizeof(UTString))
330
331 331
332/* get the actual string (array of bytes) from a Lua value */ 332/* get the actual string (array of bytes) from a Lua value */
333#define svalue(o) getstr(tsvalue(o)) 333#define svalue(o) getstr(tsvalue(o))