From 88a2023c3285c4514519158fba90e644fc6ffca3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 6 Mar 1998 13:54:42 -0300 Subject: support for strings with '\0' --- lobject.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index 9e1f94d5..9177f03c 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 1.15 1998/01/14 13:48:28 roberto Exp roberto $ +** $Id: lobject.h,v 1.16 1998/01/19 19:49:22 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -95,10 +95,13 @@ typedef struct GCnode { typedef struct TaggedString { GCnode head; - int constindex; /* hint to reuse constants (= -1 if this is a userdata) */ unsigned long hash; + int constindex; /* hint to reuse constants (= -1 if this is a userdata) */ union { - TObject globalval; + struct { + TObject globalval; + long len; /* if this is a string, here is its length */ + } s; struct { int tag; void *v; /* if this is a userdata, here is its value */ -- cgit v1.2.3-55-g6feb