소스 검색

Details

New year (2024->2025), typos in comments
Roberto Ierusalimschy 6 달 전
부모
커밋
2d8d5c74b5
15개의 변경된 파일24개의 추가작업 그리고 25개의 파일을 삭제
  1. 1 1
      ldebug.c
  2. 2 2
      ldo.c
  3. 2 2
      lgc.c
  4. 1 1
      llex.h
  5. 1 1
      llimits.h
  6. 1 1
      lmathlib.c
  7. 1 1
      lparser.h
  8. 4 4
      ltable.c
  9. 1 1
      lua.c
  10. 2 2
      lua.h
  11. 1 1
      lundump.c
  12. 2 2
      lvm.c
  13. 1 1
      lvm.h
  14. 1 1
      manual/2html
  15. 3 4
      testes/all.lua

+ 1 - 1
ldebug.c

@@ -898,7 +898,7 @@ int luaG_tracecall (lua_State *L) {
   if (ci->u.l.savedpc == p->code) {  /* first instruction (not resuming)? */
     if (p->flag & PF_ISVARARG)
       return 0;  /* hooks will start at VARARGPREP instruction */
-    else if (!(ci->callstatus & CIST_HOOKYIELD))  /* not yieded? */
+    else if (!(ci->callstatus & CIST_HOOKYIELD))  /* not yielded? */
       luaD_hookcall(L, ci);  /* check 'call' hook */
   }
   return 1;  /* keep 'trap' on */

+ 2 - 2
ldo.c

@@ -236,7 +236,7 @@ static void correctstack (lua_State *L, StkId oldstack) {
 
 #else
 /*
-** Alternatively, we can use the old address after the dealocation.
+** Alternatively, we can use the old address after the deallocation.
 ** That is not strict ISO C, but seems to work fine everywhere.
 */
 
@@ -485,7 +485,7 @@ static unsigned tryfuncTM (lua_State *L, StkId func, unsigned status) {
 }
 
 
-/* Generic case for 'moveresult */
+/* Generic case for 'moveresult' */
 l_sinline void genmoveresults (lua_State *L, StkId res, int nres,
                                              int wanted) {
   StkId firstresult = L->top.p - nres;  /* index of first result */

+ 2 - 2
lgc.c

@@ -242,7 +242,7 @@ static int iscleared (global_State *g, const GCObject *o) {
 ** incremental sweep phase, it clears the black object to white (sweep
 ** it) to avoid other barrier calls for this same object. (That cannot
 ** be done is generational mode, as its sweep does not distinguish
-** whites from deads.)
+** white from dead.)
 */
 void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
   global_State *g = G(L);
@@ -1089,7 +1089,7 @@ void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) {
 **     GCmarked: number of bytes that became old since last major collection.
 **     GCmajorminor: number of bytes marked in last major collection.
 ** * KGC_GENMAJOR
-**     GCmarked: number of bytes that became old sinse last major collection.
+**     GCmarked: number of bytes that became old since last major collection.
 **     GCmajorminor: number of bytes marked in last major collection.
 */
 

+ 1 - 1
llex.h

@@ -59,7 +59,7 @@ typedef struct Token {
 } Token;
 
 
-/* state of the lexer plus state of the parser when shared by all
+/* state of the scanner plus state of the parser when shared by all
    functions */
 typedef struct LexState {
   int current;  /* current character (charint) */

+ 1 - 1
llimits.h

@@ -159,7 +159,7 @@ typedef LUAI_UACINT l_uacInt;
 #define cast_st2S(sz)	((lua_Integer)(sz))
 
 /* Cast a ptrdiff_t to size_t, when it is known that the minuend
-** comes from the subtraend (the base)
+** comes from the subtrahend (the base)
 */
 #define ct_diff2sz(df)	((size_t)(df))
 

+ 1 - 1
lmathlib.c

@@ -106,7 +106,7 @@ static int math_floor (lua_State *L) {
 
 static int math_ceil (lua_State *L) {
   if (lua_isinteger(L, 1))
-    lua_settop(L, 1);  /* integer is its own ceil */
+    lua_settop(L, 1);  /* integer is its own ceiling */
   else {
     lua_Number d = l_mathop(ceil)(luaL_checknumber(L, 1));
     pushnumint(L, d);

+ 1 - 1
lparser.h

@@ -32,7 +32,7 @@ typedef enum {
   VKFLT,  /* floating constant; nval = numerical float value */
   VKINT,  /* integer constant; ival = numerical integer value */
   VKSTR,  /* string constant; strval = TString address;
-             (string is fixed by the lexer) */
+             (string is fixed by the scanner) */
   VNONRELOC,  /* expression has its value in a fixed register;
                  info = result register */
   VLOCAL,  /* local variable; var.ridx = register index;

+ 4 - 4
ltable.c

@@ -123,7 +123,7 @@ typedef union {
 
 /*
 ** Common hash part for tables with empty hash parts. That allows all
-** tables to have a hash part, avoding an extra check ("is there a hash
+** tables to have a hash part, avoiding an extra check ("is there a hash
 ** part?") when indexing. Its sole node has an empty value and a key
 ** (DEADKEY, NULL) that is different from any valid TValue.
 */
@@ -699,7 +699,7 @@ static void clearNewSlice (Table *t, unsigned oldasize, unsigned newasize) {
 ** into the table, initializes the new part of the array (if any) with
 ** nils and reinserts the elements of the old hash back into the new
 ** parts of the table.
-** Note that if the new size for the arry part ('newasize') is equal to
+** Note that if the new size for the array part ('newasize') is equal to
 ** the old one ('oldasize'), this function will do nothing with that
 ** part.
 */
@@ -774,7 +774,7 @@ static void rehash (lua_State *L, Table *t, const TValue *ek) {
   nsize = ct.total - ct.na;
   if (ct.deleted) {  /* table has deleted entries? */
     /* insertion-deletion-insertion: give hash some extra size to
-       avoid constant resizings */
+       avoid repeated resizings */
     nsize += nsize >> 2;
   }
   /* resize the table to new computed sizes */
@@ -1300,7 +1300,7 @@ lua_Unsigned luaH_getn (Table *t) {
         return newhint(t, binsearch(t, limit, asize));
       }
     }
-    /* last element non empty; set a hint to speed up findind that again */
+    /* last element non empty; set a hint to speed up finding that again */
     /* (keys in the hash part cannot be hints) */
     *lenhint(t) = asize;
   }

+ 1 - 1
lua.c

@@ -497,7 +497,7 @@ static void lua_freeline (char *line) {
 static void lua_initreadline (lua_State *L) {
   void *lib = dlopen(LUA_READLINELIB, RTLD_NOW | RTLD_LOCAL);
   if (lib == NULL)
-    lua_warning(L, "library '" LUA_READLINELIB "'not found", 0);
+    lua_warning(L, "library '" LUA_READLINELIB "' not found", 0);
   else {
     const char **name = cast(const char**, dlsym(lib, "rl_readline_name"));
     if (name != NULL)

+ 2 - 2
lua.h

@@ -13,7 +13,7 @@
 #include <stddef.h>
 
 
-#define LUA_COPYRIGHT	LUA_RELEASE "  Copyright (C) 1994-2024 Lua.org, PUC-Rio"
+#define LUA_COPYRIGHT	LUA_RELEASE "  Copyright (C) 1994-2025 Lua.org, PUC-Rio"
 #define LUA_AUTHORS	"R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
 
 
@@ -528,7 +528,7 @@ struct lua_Debug {
 
 
 /******************************************************************************
-* Copyright (C) 1994-2024 Lua.org, PUC-Rio.
+* Copyright (C) 1994-2025 Lua.org, PUC-Rio.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the

+ 1 - 1
lundump.c

@@ -63,7 +63,7 @@ static void loadBlock (LoadState *S, void *b, size_t size) {
 
 static void loadAlign (LoadState *S, unsigned align) {
   unsigned padding = align - cast_uint(S->offset % align);
-  if (padding < align) {  /* apd == align means no padding */
+  if (padding < align) {  /* (padding == align) means no padding */
     lua_Integer paddingContent;
     loadBlock(S, &paddingContent, padding);
     lua_assert(S->offset % align == 0);

+ 2 - 2
lvm.c

@@ -127,8 +127,8 @@ int luaV_flttointeger (lua_Number n, lua_Integer *p, F2Imod mode) {
   lua_Number f = l_floor(n);
   if (n != f) {  /* not an integral value? */
     if (mode == F2Ieq) return 0;  /* fails if mode demands integral value */
-    else if (mode == F2Iceil)  /* needs ceil? */
-      f += 1;  /* convert floor to ceil (remember: n != f) */
+    else if (mode == F2Iceil)  /* needs ceiling? */
+      f += 1;  /* convert floor to ceiling (remember: n != f) */
   }
   return lua_numbertointeger(f, p);
 }

+ 1 - 1
lvm.h

@@ -43,7 +43,7 @@
 typedef enum {
   F2Ieq,     /* no rounding; accepts only integral values */
   F2Ifloor,  /* takes the floor of the number */
-  F2Iceil    /* takes the ceil of the number */
+  F2Iceil    /* takes the ceiling of the number */
 } F2Imod;
 
 

+ 1 - 1
manual/2html

@@ -30,7 +30,7 @@ by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
 <p>
 <small>
 <a href="http://www.lua.org/copyright.html">Copyright</a>
-&copy; 2024 Lua.org, PUC-Rio.  All rights reserved.
+&copy; 2025 Lua.org, PUC-Rio.  All rights reserved.
 </small>
 <hr>
 

+ 3 - 4
testes/all.lua

@@ -28,10 +28,9 @@ _nomsg = rawget(_G, "_nomsg") or false
 local usertests = rawget(_G, "_U")
 
 if usertests then
-  -- tests for sissies ;)  Avoid problems
-  _soft = true
-  _port = true
-  _nomsg = true
+  _soft = true   -- avoid tests that take too long
+  _port = true   -- avoid non-portable tests
+  _nomsg = true  -- avoid messages about tests not performed
 end
 
 -- tests should require debug when needed