Skip to content

Commit 2780def

Browse files
ligurioigormunkin
authored andcommitted
codehealth: fix typos
Fix typos found with codespell in files with our own source code. Furthermore, several warnings found by the checkpatch.pl [1] script are fixed either. 1. https://github.com/tarantool/checkpatch Reviewed-by: Maxim Kokryashkin <[email protected]> Reviewed-by: Sergey Kaplun <[email protected]> Signed-off-by: Igor Munkin <[email protected]>
1 parent 0380a8c commit 2780def

33 files changed

+53
-54
lines changed

src/lj_memprof.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ int lj_memprof_start(struct lua_State *L, const struct lj_memprof_options *opt)
257257
lj_assertL(opt->writer != NULL, "uninitialized memprof writer");
258258
lj_assertL(opt->on_stop != NULL, "uninitialized on stop memprof callback");
259259
lj_assertL(opt->buf != NULL, "uninitialized memprof writer buffer");
260-
lj_assertL(opt->len != 0, "bad memprof writer buffer lenght");
260+
lj_assertL(opt->len != 0, "bad memprof writer buffer length");
261261

262262
if (mp->state != MPS_IDLE) {
263-
/* Clean up resourses. Ignore possible errors. */
263+
/* Clean up resources. Ignore possible errors. */
264264
opt->on_stop(opt->ctx, opt->buf);
265265
return PROFILE_ERRRUN;
266266
}
@@ -392,7 +392,7 @@ void lj_memprof_add_trace(const struct GCtrace *tr)
392392
int lj_memprof_start(struct lua_State *L, const struct lj_memprof_options *opt)
393393
{
394394
UNUSED(L);
395-
/* Clean up resourses. Ignore possible errors. */
395+
/* Clean up resources. Ignore possible errors. */
396396
opt->on_stop(opt->ctx, opt->buf);
397397
return PROFILE_ERRUSE;
398398
}

src/lj_sysprof.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ int lj_sysprof_stop(lua_State *L)
502502
if (SPS_HALT == sp->state) {
503503
errno = sp->saved_errno;
504504
sp->state = SPS_IDLE;
505-
/* wbuf was terminated when error occured. */
505+
/* wbuf was terminated when error occurred. */
506506
return PROFILE_ERRIO;
507507
}
508508

src/lj_wbuf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void lj_wbuf_addn(struct lj_wbuf *buf, const void *src, size_t n);
7575
/* Write string to the buffer. */
7676
void LJ_FASTCALL lj_wbuf_addstring(struct lj_wbuf *buf, const char *s);
7777

78-
/* Immediatly flush the buffer. */
78+
/* Immediately flush the buffer. */
7979
void LJ_FASTCALL lj_wbuf_flush(struct lj_wbuf *buf);
8080

8181
/* Check flags. */

src/luajit-gdb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def strdata(obj):
314314
try:
315315
return str(cast('char *', cast('GCstr *', obj) + 1))[len(PADDING):]
316316
except UnicodeEncodeError:
317-
return "<luajit-gdb: error occured while rendering non-ascii slot>"
317+
return "<luajit-gdb: error occurred while rendering non-ascii slot>"
318318

319319

320320
def itypemap(o):
@@ -687,7 +687,7 @@ class LJDumpTable(LJBase):
687687
'''
688688
lj-tab <GCtab *>
689689
690-
The command receives a GCtab adress and dumps the table contents:
690+
The command receives a GCtab address and dumps the table contents:
691691
* Metatable address whether the one is set
692692
* Array part <asize> slots:
693693
<aslot ptr>: [<index>]: <tv>
@@ -759,7 +759,7 @@ class LJDumpStack(LJBase):
759759
+ CP: Protected C frame
760760
+ PP: VM performs a call as a result of executinig pcall or xpcall
761761
762-
If L is ommited the main coroutine is used.
762+
If L is omitted the main coroutine is used.
763763
'''
764764

765765
def invoke(self, arg, from_tty):

src/luajit_lldb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def strdata(obj):
525525
ptr = cast('char *', obj + 1)
526526
return ptr.summary
527527
except UnicodeEncodeError:
528-
return "<luajit-lldb: error occured while rendering non-ascii slot>"
528+
return "<luajit-lldb: error occurred while rendering non-ascii slot>"
529529

530530

531531
def itype(o):
@@ -996,7 +996,7 @@ class LJDumpTable(Command):
996996
'''
997997
lj-tab <GCtab *>
998998
999-
The command receives a GCtab adress and dumps the table contents:
999+
The command receives a GCtab address and dumps the table contents:
10001000
* Metatable address whether the one is set
10011001
* Array part <asize> slots:
10021002
<aslot ptr>: [<index>]: <tv>
@@ -1067,7 +1067,7 @@ class LJDumpStack(Command):
10671067
+ CP: Protected C frame
10681068
+ PP: VM performs a call as a result of executinig pcall or xpcall
10691069
1070-
If L is ommited the main coroutine is used.
1070+
If L is omitted the main coroutine is used.
10711071
'''
10721072
def execute(self, debugger, args, result):
10731073
lstate = self.parse(args)

test/LuaJIT-tests/src/ctest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static int costatus(lua_State *L, lua_State *co) {
234234
else
235235
return CO_SUS; /* initial state */
236236
}
237-
default: /* some error occured */
237+
default: /* some error occurred */
238238
return CO_DEAD;
239239
}
240240
}

test/PUC-Rio-Lua-5.1-tests/api.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function pack(...) return arg end
1717

1818
print('testing C API')
1919

20-
-- testing allignment
20+
-- testing alignment
2121
a = T.d2s(12458954321123)
2222
assert(string.len(a) == 8) -- sizeof(double)
2323
assert(T.s2d(a) == 12458954321123)
@@ -333,7 +333,7 @@ F = function (x)
333333
if A ~= nil then
334334
assert(type(A) == "userdata")
335335
assert(T.udataval(A) == B)
336-
debug.getmetatable(A) -- just acess it
336+
debug.getmetatable(A) -- just access it
337337
end
338338
A = x -- ressucita userdata
339339
B = udval

test/PUC-Rio-Lua-5.1-tests/db.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ t[1] = "'error'"
561561
checktraceback(co, t)
562562

563563

564-
-- test acessing line numbers of a coroutine from a resume inside
564+
-- test accessing line numbers of a coroutine from a resume inside
565565
-- a C function (this is a known bug in Lua 5.0)
566566

567567
local function g(x)

test/PUC-Rio-Lua-5.1-tests/gc.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ do
308308
assert(getmetatable(o) == tt)
309309
-- create new objects during GC
310310
local a = 'xuxu'..(10+3)..'joao', {}
311-
___Glob = o -- ressurect object!
311+
___Glob = o -- resurrect object!
312312
newproxy(o) -- creates a new one with same metatable
313313
print(">>> closing state " .. "<<<\n")
314314
end

test/PUC-Rio-Lua-5.1-tests/math.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ stat(a)
165165

166166
a = nil
167167

168-
-- testing implicit convertions
168+
-- testing implicit conversions
169169

170170
local a,b = '10', '20'
171171
assert(a*b == 200 and a+b == 30 and a-b == -10 and a/b == 0.5 and -b == -20)

0 commit comments

Comments
 (0)