aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-16 11:51:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-16 11:51:16 -0300
commit2d8d5c74b5ef3d333314feede0165df7c3d13811 (patch)
tree320305677dc890ec28cc6720810967f07a20d358
parent3cdd49c94a8feed94853ba3a6adaa556fb34fd8d (diff)
downloadlua-2d8d5c74b5ef3d333314feede0165df7c3d13811.tar.gz
lua-2d8d5c74b5ef3d333314feede0165df7c3d13811.tar.bz2
lua-2d8d5c74b5ef3d333314feede0165df7c3d13811.zip
Details
New year (2024->2025), typos in comments
-rw-r--r--ldebug.c2
-rw-r--r--ldo.c4
-rw-r--r--lgc.c4
-rw-r--r--llex.h2
-rw-r--r--llimits.h2
-rw-r--r--lmathlib.c2
-rw-r--r--lparser.h2
-rw-r--r--ltable.c8
-rw-r--r--lua.c2
-rw-r--r--lua.h4
-rw-r--r--lundump.c2
-rw-r--r--lvm.c4
-rw-r--r--lvm.h2
-rwxr-xr-xmanual/2html2
-rw-r--r--testes/all.lua7
15 files changed, 24 insertions, 25 deletions
diff --git a/ldebug.c b/ldebug.c
index 09ec197c..af3b7583 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -898,7 +898,7 @@ int luaG_tracecall (lua_State *L) {
898 if (ci->u.l.savedpc == p->code) { /* first instruction (not resuming)? */ 898 if (ci->u.l.savedpc == p->code) { /* first instruction (not resuming)? */
899 if (p->flag & PF_ISVARARG) 899 if (p->flag & PF_ISVARARG)
900 return 0; /* hooks will start at VARARGPREP instruction */ 900 return 0; /* hooks will start at VARARGPREP instruction */
901 else if (!(ci->callstatus & CIST_HOOKYIELD)) /* not yieded? */ 901 else if (!(ci->callstatus & CIST_HOOKYIELD)) /* not yielded? */
902 luaD_hookcall(L, ci); /* check 'call' hook */ 902 luaD_hookcall(L, ci); /* check 'call' hook */
903 } 903 }
904 return 1; /* keep 'trap' on */ 904 return 1; /* keep 'trap' on */
diff --git a/ldo.c b/ldo.c
index 009bf47a..fb9df5d3 100644
--- a/ldo.c
+++ b/ldo.c
@@ -236,7 +236,7 @@ static void correctstack (lua_State *L, StkId oldstack) {
236 236
237#else 237#else
238/* 238/*
239** Alternatively, we can use the old address after the dealocation. 239** Alternatively, we can use the old address after the deallocation.
240** That is not strict ISO C, but seems to work fine everywhere. 240** That is not strict ISO C, but seems to work fine everywhere.
241*/ 241*/
242 242
@@ -485,7 +485,7 @@ static unsigned tryfuncTM (lua_State *L, StkId func, unsigned status) {
485} 485}
486 486
487 487
488/* Generic case for 'moveresult */ 488/* Generic case for 'moveresult' */
489l_sinline void genmoveresults (lua_State *L, StkId res, int nres, 489l_sinline void genmoveresults (lua_State *L, StkId res, int nres,
490 int wanted) { 490 int wanted) {
491 StkId firstresult = L->top.p - nres; /* index of first result */ 491 StkId firstresult = L->top.p - nres; /* index of first result */
diff --git a/lgc.c b/lgc.c
index 3cdfd006..1e9f7569 100644
--- a/lgc.c
+++ b/lgc.c
@@ -242,7 +242,7 @@ static int iscleared (global_State *g, const GCObject *o) {
242** incremental sweep phase, it clears the black object to white (sweep 242** incremental sweep phase, it clears the black object to white (sweep
243** it) to avoid other barrier calls for this same object. (That cannot 243** it) to avoid other barrier calls for this same object. (That cannot
244** be done is generational mode, as its sweep does not distinguish 244** be done is generational mode, as its sweep does not distinguish
245** whites from deads.) 245** white from dead.)
246*/ 246*/
247void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) { 247void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
248 global_State *g = G(L); 248 global_State *g = G(L);
@@ -1089,7 +1089,7 @@ void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) {
1089** GCmarked: number of bytes that became old since last major collection. 1089** GCmarked: number of bytes that became old since last major collection.
1090** GCmajorminor: number of bytes marked in last major collection. 1090** GCmajorminor: number of bytes marked in last major collection.
1091** * KGC_GENMAJOR 1091** * KGC_GENMAJOR
1092** GCmarked: number of bytes that became old sinse last major collection. 1092** GCmarked: number of bytes that became old since last major collection.
1093** GCmajorminor: number of bytes marked in last major collection. 1093** GCmajorminor: number of bytes marked in last major collection.
1094*/ 1094*/
1095 1095
diff --git a/llex.h b/llex.h
index 389d2f86..c3500ef6 100644
--- a/llex.h
+++ b/llex.h
@@ -59,7 +59,7 @@ typedef struct Token {
59} Token; 59} Token;
60 60
61 61
62/* state of the lexer plus state of the parser when shared by all 62/* state of the scanner plus state of the parser when shared by all
63 functions */ 63 functions */
64typedef struct LexState { 64typedef struct LexState {
65 int current; /* current character (charint) */ 65 int current; /* current character (charint) */
diff --git a/llimits.h b/llimits.h
index 6cf35e0c..d98171ae 100644
--- a/llimits.h
+++ b/llimits.h
@@ -159,7 +159,7 @@ typedef LUAI_UACINT l_uacInt;
159#define cast_st2S(sz) ((lua_Integer)(sz)) 159#define cast_st2S(sz) ((lua_Integer)(sz))
160 160
161/* Cast a ptrdiff_t to size_t, when it is known that the minuend 161/* Cast a ptrdiff_t to size_t, when it is known that the minuend
162** comes from the subtraend (the base) 162** comes from the subtrahend (the base)
163*/ 163*/
164#define ct_diff2sz(df) ((size_t)(df)) 164#define ct_diff2sz(df) ((size_t)(df))
165 165
diff --git a/lmathlib.c b/lmathlib.c
index f8b24d1d..c7418e69 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -106,7 +106,7 @@ static int math_floor (lua_State *L) {
106 106
107static int math_ceil (lua_State *L) { 107static int math_ceil (lua_State *L) {
108 if (lua_isinteger(L, 1)) 108 if (lua_isinteger(L, 1))
109 lua_settop(L, 1); /* integer is its own ceil */ 109 lua_settop(L, 1); /* integer is its own ceiling */
110 else { 110 else {
111 lua_Number d = l_mathop(ceil)(luaL_checknumber(L, 1)); 111 lua_Number d = l_mathop(ceil)(luaL_checknumber(L, 1));
112 pushnumint(L, d); 112 pushnumint(L, d);
diff --git a/lparser.h b/lparser.h
index a8004fa0..a3063569 100644
--- a/lparser.h
+++ b/lparser.h
@@ -32,7 +32,7 @@ typedef enum {
32 VKFLT, /* floating constant; nval = numerical float value */ 32 VKFLT, /* floating constant; nval = numerical float value */
33 VKINT, /* integer constant; ival = numerical integer value */ 33 VKINT, /* integer constant; ival = numerical integer value */
34 VKSTR, /* string constant; strval = TString address; 34 VKSTR, /* string constant; strval = TString address;
35 (string is fixed by the lexer) */ 35 (string is fixed by the scanner) */
36 VNONRELOC, /* expression has its value in a fixed register; 36 VNONRELOC, /* expression has its value in a fixed register;
37 info = result register */ 37 info = result register */
38 VLOCAL, /* local variable; var.ridx = register index; 38 VLOCAL, /* local variable; var.ridx = register index;
diff --git a/ltable.c b/ltable.c
index 122b7f17..8df9a4fb 100644
--- a/ltable.c
+++ b/ltable.c
@@ -123,7 +123,7 @@ typedef union {
123 123
124/* 124/*
125** Common hash part for tables with empty hash parts. That allows all 125** Common hash part for tables with empty hash parts. That allows all
126** tables to have a hash part, avoding an extra check ("is there a hash 126** tables to have a hash part, avoiding an extra check ("is there a hash
127** part?") when indexing. Its sole node has an empty value and a key 127** part?") when indexing. Its sole node has an empty value and a key
128** (DEADKEY, NULL) that is different from any valid TValue. 128** (DEADKEY, NULL) that is different from any valid TValue.
129*/ 129*/
@@ -699,7 +699,7 @@ static void clearNewSlice (Table *t, unsigned oldasize, unsigned newasize) {
699** into the table, initializes the new part of the array (if any) with 699** into the table, initializes the new part of the array (if any) with
700** nils and reinserts the elements of the old hash back into the new 700** nils and reinserts the elements of the old hash back into the new
701** parts of the table. 701** parts of the table.
702** Note that if the new size for the arry part ('newasize') is equal to 702** Note that if the new size for the array part ('newasize') is equal to
703** the old one ('oldasize'), this function will do nothing with that 703** the old one ('oldasize'), this function will do nothing with that
704** part. 704** part.
705*/ 705*/
@@ -774,7 +774,7 @@ static void rehash (lua_State *L, Table *t, const TValue *ek) {
774 nsize = ct.total - ct.na; 774 nsize = ct.total - ct.na;
775 if (ct.deleted) { /* table has deleted entries? */ 775 if (ct.deleted) { /* table has deleted entries? */
776 /* insertion-deletion-insertion: give hash some extra size to 776 /* insertion-deletion-insertion: give hash some extra size to
777 avoid constant resizings */ 777 avoid repeated resizings */
778 nsize += nsize >> 2; 778 nsize += nsize >> 2;
779 } 779 }
780 /* resize the table to new computed sizes */ 780 /* resize the table to new computed sizes */
@@ -1300,7 +1300,7 @@ lua_Unsigned luaH_getn (Table *t) {
1300 return newhint(t, binsearch(t, limit, asize)); 1300 return newhint(t, binsearch(t, limit, asize));
1301 } 1301 }
1302 } 1302 }
1303 /* last element non empty; set a hint to speed up findind that again */ 1303 /* last element non empty; set a hint to speed up finding that again */
1304 /* (keys in the hash part cannot be hints) */ 1304 /* (keys in the hash part cannot be hints) */
1305 *lenhint(t) = asize; 1305 *lenhint(t) = asize;
1306 } 1306 }
diff --git a/lua.c b/lua.c
index ea6141bb..64d39160 100644
--- a/lua.c
+++ b/lua.c
@@ -497,7 +497,7 @@ static void lua_freeline (char *line) {
497static void lua_initreadline (lua_State *L) { 497static void lua_initreadline (lua_State *L) {
498 void *lib = dlopen(LUA_READLINELIB, RTLD_NOW | RTLD_LOCAL); 498 void *lib = dlopen(LUA_READLINELIB, RTLD_NOW | RTLD_LOCAL);
499 if (lib == NULL) 499 if (lib == NULL)
500 lua_warning(L, "library '" LUA_READLINELIB "'not found", 0); 500 lua_warning(L, "library '" LUA_READLINELIB "' not found", 0);
501 else { 501 else {
502 const char **name = cast(const char**, dlsym(lib, "rl_readline_name")); 502 const char **name = cast(const char**, dlsym(lib, "rl_readline_name"));
503 if (name != NULL) 503 if (name != NULL)
diff --git a/lua.h b/lua.h
index aefa3b8c..76068fdc 100644
--- a/lua.h
+++ b/lua.h
@@ -13,7 +13,7 @@
13#include <stddef.h> 13#include <stddef.h>
14 14
15 15
16#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2024 Lua.org, PUC-Rio" 16#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2025 Lua.org, PUC-Rio"
17#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" 17#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
18 18
19 19
@@ -528,7 +528,7 @@ struct lua_Debug {
528 528
529 529
530/****************************************************************************** 530/******************************************************************************
531* Copyright (C) 1994-2024 Lua.org, PUC-Rio. 531* Copyright (C) 1994-2025 Lua.org, PUC-Rio.
532* 532*
533* Permission is hereby granted, free of charge, to any person obtaining 533* Permission is hereby granted, free of charge, to any person obtaining
534* a copy of this software and associated documentation files (the 534* a copy of this software and associated documentation files (the
diff --git a/lundump.c b/lundump.c
index 4d6e8bd2..fd5a2ca6 100644
--- a/lundump.c
+++ b/lundump.c
@@ -63,7 +63,7 @@ static void loadBlock (LoadState *S, void *b, size_t size) {
63 63
64static void loadAlign (LoadState *S, unsigned align) { 64static void loadAlign (LoadState *S, unsigned align) {
65 unsigned padding = align - cast_uint(S->offset % align); 65 unsigned padding = align - cast_uint(S->offset % align);
66 if (padding < align) { /* apd == align means no padding */ 66 if (padding < align) { /* (padding == align) means no padding */
67 lua_Integer paddingContent; 67 lua_Integer paddingContent;
68 loadBlock(S, &paddingContent, padding); 68 loadBlock(S, &paddingContent, padding);
69 lua_assert(S->offset % align == 0); 69 lua_assert(S->offset % align == 0);
diff --git a/lvm.c b/lvm.c
index 074ee718..f0e73f9b 100644
--- a/lvm.c
+++ b/lvm.c
@@ -127,8 +127,8 @@ int luaV_flttointeger (lua_Number n, lua_Integer *p, F2Imod mode) {
127 lua_Number f = l_floor(n); 127 lua_Number f = l_floor(n);
128 if (n != f) { /* not an integral value? */ 128 if (n != f) { /* not an integral value? */
129 if (mode == F2Ieq) return 0; /* fails if mode demands integral value */ 129 if (mode == F2Ieq) return 0; /* fails if mode demands integral value */
130 else if (mode == F2Iceil) /* needs ceil? */ 130 else if (mode == F2Iceil) /* needs ceiling? */
131 f += 1; /* convert floor to ceil (remember: n != f) */ 131 f += 1; /* convert floor to ceiling (remember: n != f) */
132 } 132 }
133 return lua_numbertointeger(f, p); 133 return lua_numbertointeger(f, p);
134} 134}
diff --git a/lvm.h b/lvm.h
index c8898559..be7b9cb0 100644
--- a/lvm.h
+++ b/lvm.h
@@ -43,7 +43,7 @@
43typedef enum { 43typedef enum {
44 F2Ieq, /* no rounding; accepts only integral values */ 44 F2Ieq, /* no rounding; accepts only integral values */
45 F2Ifloor, /* takes the floor of the number */ 45 F2Ifloor, /* takes the floor of the number */
46 F2Iceil /* takes the ceil of the number */ 46 F2Iceil /* takes the ceiling of the number */
47} F2Imod; 47} F2Imod;
48 48
49 49
diff --git a/manual/2html b/manual/2html
index 59bb4578..ac5ea043 100755
--- a/manual/2html
+++ b/manual/2html
@@ -30,7 +30,7 @@ by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
30<p> 30<p>
31<small> 31<small>
32<a href="http://www.lua.org/copyright.html">Copyright</a> 32<a href="http://www.lua.org/copyright.html">Copyright</a>
33&copy; 2024 Lua.org, PUC-Rio. All rights reserved. 33&copy; 2025 Lua.org, PUC-Rio. All rights reserved.
34</small> 34</small>
35<hr> 35<hr>
36 36
diff --git a/testes/all.lua b/testes/all.lua
index 3c1ff5c7..4ffa9efe 100644
--- a/testes/all.lua
+++ b/testes/all.lua
@@ -28,10 +28,9 @@ _nomsg = rawget(_G, "_nomsg") or false
28local usertests = rawget(_G, "_U") 28local usertests = rawget(_G, "_U")
29 29
30if usertests then 30if usertests then
31 -- tests for sissies ;) Avoid problems 31 _soft = true -- avoid tests that take too long
32 _soft = true 32 _port = true -- avoid non-portable tests
33 _port = true 33 _nomsg = true -- avoid messages about tests not performed
34 _nomsg = true
35end 34end
36 35
37-- tests should require debug when needed 36-- tests should require debug when needed