Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
luatex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeXLive
luatex
Commits
05d9001d
Commit
05d9001d
authored
8 years ago
by
Luigi Scarso
Browse files
Options
Downloads
Patches
Plain Diff
slightly better luastuff.w -- !!! WARNING: WORK IN PROGRESS !!!
parent
85bcb607
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/texk/web2c/luatexdir/lua/luastuff.w
+8
-8
8 additions, 8 deletions
source/texk/web2c/luatexdir/lua/luastuff.w
with
8 additions
and
8 deletions
source/texk/web2c/luatexdir/lua/luastuff.w
+
8
−
8
View file @
05d9001d
...
...
@@ -83,7 +83,11 @@ static const char *getS(lua_State * L, void *ud, size_t * size)
@
@c
#
ifdef
LuajitTeX
/* not used */
/* Luatex has its own memory allocator, LuajitTeX uses the */
/* standard one from the stock. We left this space as */
/* reference, but be careful: memory allocator is a key */
/* component in luajit, it's easy to get sub-optimal */
/* performances. */
#
else
static
void
*
my_luaalloc
(
void
*
ud
,
void
*
ptr
,
size_t
osize
,
size_t
nsize
)
{
...
...
@@ -145,8 +149,9 @@ static const luaL_Reg lualibs[] = {
{ "lpeg", luaopen_lpeg },
{ "bit32", luaopen_bit32 },
#ifdef LuajitTeX
{ "bit", luaopen_bit },
/* bit is only in luajit, */
/* coroutine is loaded in a special way */
{ "bit", luaopen_bit },
#else
{ "coroutine", luaopen_coroutine },
#endif
...
...
@@ -158,8 +163,6 @@ static const luaL_Reg lualibs[] = {
/* extra standard lua libraries */
#ifdef LuajitTeX
{ "jit", luaopen_jit },
#else
{ "coroutine", luaopen_coroutine },
#endif
{ "ffi", luaopen_ffi },
/* obsolete, undocumented and for oru own testing only */
...
...
@@ -179,7 +182,7 @@ static void do_openlibs(lua_State * L)
@
@c
#
ifdef
LuajitTeX
/* not used
*/
/*
in luajit load_aux is
not used
.
*/
#
else
static
int
load_aux
(
lua_State
*
L
,
int
status
)
{
if (status == 0) /* OK? */
...
...
@@ -303,9 +306,7 @@ void luainterpreter(void)
*/
if (!nosocket_option) {
/* todo: move this to common */
lua_getglobal(L, "package");
lua_getfield(L, -1, "loaded");
if (!lua_istable(L, -1)) {
...
...
@@ -328,7 +329,6 @@ void luainterpreter(void)
}
/* zlib. slightly odd calling convention */
luaopen_zlib(L);
lua_setglobal(L, "zlib");
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment