A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/4240ce8eb38ee9c89ce8694faab37e8db8fca209 below:

pre-compile embedded Lua source into bytecode (#16631) · neovim/neovim@4240ce8 · GitHub

@@ -404,9 +404,9 @@ static int nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL

404 404 405 405

{

406 406

const char *code = (char *)&shared_module[0];

407 -

if (luaL_loadbuffer(lstate, code, strlen(code), "@vim/shared.lua")

407 +

if (luaL_loadbuffer(lstate, code, sizeof(shared_module) - 1, "@vim/shared.lua")

408 408

|| nlua_pcall(lstate, 0, 0)) {

409 -

nlua_error(lstate, _("E5106: Error while creating shared module: %.*s"));

409 +

nlua_error(lstate, _("E5106: Error while creating shared module: %.*s\n"));

410 410

return 1;

411 411

}

412 412

}

@@ -416,18 +416,18 @@ static int nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL

416 416

lua_getfield(lstate, -1, "loaded"); // [package, loaded]

417 417 418 418

const char *code = (char *)&inspect_module[0];

419 -

if (luaL_loadbuffer(lstate, code, strlen(code), "@vim/inspect.lua")

419 +

if (luaL_loadbuffer(lstate, code, sizeof(inspect_module) - 1, "@vim/inspect.lua")

420 420

|| nlua_pcall(lstate, 0, 1)) {

421 -

nlua_error(lstate, _("E5106: Error while creating inspect module: %.*s"));

421 +

nlua_error(lstate, _("E5106: Error while creating inspect module: %.*s\n"));

422 422

return 1;

423 423

}

424 424

// [package, loaded, inspect]

425 425

lua_setfield(lstate, -2, "vim.inspect"); // [package, loaded]

426 426 427 427

code = (char *)&lua_F_module[0];

428 -

if (luaL_loadbuffer(lstate, code, strlen(code), "@vim/F.lua")

428 +

if (luaL_loadbuffer(lstate, code, sizeof(lua_F_module) - 1, "@vim/F.lua")

429 429

|| nlua_pcall(lstate, 0, 1)) {

430 -

nlua_error(lstate, _("E5106: Error while creating vim.F module: %.*s"));

430 +

nlua_error(lstate, _("E5106: Error while creating vim.F module: %.*s\n"));

431 431

return 1;

432 432

}

433 433

// [package, loaded, module]

@@ -438,9 +438,9 @@ static int nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL

438 438 439 439

{

440 440

const char *code = (char *)&vim_module[0];

441 -

if (luaL_loadbuffer(lstate, code, strlen(code), "@vim.lua")

441 +

if (luaL_loadbuffer(lstate, code, sizeof(vim_module) - 1, "@vim.lua")

442 442

|| nlua_pcall(lstate, 0, 0)) {

443 -

nlua_error(lstate, _("E5106: Error while creating vim module: %.*s"));

443 +

nlua_error(lstate, _("E5106: Error while creating vim module: %.*s\n"));

444 444

return 1;

445 445

}

446 446

}

@@ -450,9 +450,9 @@ static int nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL

450 450

lua_getfield(lstate, -1, "loaded"); // [package, loaded]

451 451 452 452

const char *code = (char *)&lua_meta_module[0];

453 -

if (luaL_loadbuffer(lstate, code, strlen(code), "@vim/_meta.lua")

453 +

if (luaL_loadbuffer(lstate, code, sizeof(lua_meta_module) - 1, "@vim/_meta.lua")

454 454

|| nlua_pcall(lstate, 0, 1)) {

455 -

nlua_error(lstate, _("E5106: Error while creating vim._meta module: %.*s"));

455 +

nlua_error(lstate, _("E5106: Error while creating vim._meta module: %.*s\n"));

456 456

return 1;

457 457

}

458 458

// [package, loaded, module]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4