History

Lua 4.0.1

Lua Team committed 24 years ago

Commit c2bb7181 parent e22497f11 files · +141 −21Browse files

Showing the changes to src/lstring.c (1 of 11 files). Show all

Unified · Split

src/lstring.c+2−2
@@ -1,5 +1,5 @@
1/*1/*
2** $Id: lstring.c,v 1.45 2000/10/30 17:49:19 roberto Exp $2** $Id: lstring.c,v 1.45a 2000/10/30 17:49:19 roberto Exp $
3** String table (keeps all strings handled by Lua)3** String table (keeps all strings handled by Lua)
4** See Copyright Notice in lua.h4** See Copyright Notice in lua.h
5*/5*/
@@ -119,7 +119,7 @@ TString *luaS_newudata (lua_State *L, size_t s, void *udata) { · 113 unmodified lines
119 ts->nexthash = NULL;119 ts->nexthash = NULL;
120 ts->len = s;120 ts->len = s;
121 ts->u.d.tag = 0;121 ts->u.d.tag = 0;
122 ts->u.d.value = (udata == NULL) ? uts+1 : udata;122 ts->u.d.value = (s > 0) ? uts+1 : udata;
123 L->nblocks += sizestring(s);123 L->nblocks += sizestring(s);
124 /* insert it on table */124 /* insert it on table */
125 newentry(L, &L->udt, ts, IntPoint(ts->u.d.value) & (L->udt.size-1));125 newentry(L, &L->udt, ts, IntPoint(ts->u.d.value) & (L->udt.size-1));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t