FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
fastfetch/src/common/lua.h at dev · fastfetch-cli/fastfetch · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
fastfetch-cli
/
fastfetch
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
867
Star
24.4k
Code
Issues
57
Pull requests
20
Discussions
Actions
Wiki
Security and quality
1
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
fastfetch
/
src
/
common
/
lua.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
187 lines (149 loc) · 5.4 KB
Breadcrumbs
fastfetch
/
src
/
common
/
lua.h
Copy path
File metadata and controls
187 lines (149 loc) · 5.4 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#pragma
once
#include
"fastfetch.h"
#if
FF_HAVE_LUA
#if
!
FF_DISABLE_DLOPEN
// Hack. LUA_API is defined as extern which prevents us from implementing the functions ourselves.
#include
<luaconf.h>
#undef
LUA_API
#undef
LUALIB_API
#undef
LUAMOD_API
#define
LUA_API
static inline
#define
LUALIB_API
LUA_API
#define
LUAMOD_API
LUA_API
#pragma
GCC diagnostic ignored "-Wunused-function"
#endif
#include
<lua.h>
#include
<lauxlib.h>
#include
<lualib.h>
#ifndef
LUA_GNAME
#define
LUA_GNAME
"_G"
#endif
#include
"common/library.h"
extern
struct
FFLuaData
{
#if
!
FF_DISABLE_DLOPEN
FF_LIBRARY_SYMBOL
(
luaL_checkany
)
FF_LIBRARY_SYMBOL
(
luaL_loadbufferx
)
FF_LIBRARY_SYMBOL
(
luaL_tolstring
)
FF_LIBRARY_SYMBOL
(
lua_callk
)
FF_LIBRARY_SYMBOL
(
lua_createtable
)
FF_LIBRARY_SYMBOL
(
lua_error
)
FF_LIBRARY_SYMBOL
(
lua_gettop
)
FF_LIBRARY_SYMBOL
(
lua_isinteger
)
FF_LIBRARY_SYMBOL
(
lua_next
)
FF_LIBRARY_SYMBOL
(
lua_pcallk
)
FF_LIBRARY_SYMBOL
(
lua_pushboolean
)
FF_LIBRARY_SYMBOL
(
lua_pushcclosure
)
FF_LIBRARY_SYMBOL
(
lua_pushinteger
)
FF_LIBRARY_SYMBOL
(
lua_pushlstring
)
FF_LIBRARY_SYMBOL
(
lua_pushnil
)
FF_LIBRARY_SYMBOL
(
lua_pushnumber
)
FF_LIBRARY_SYMBOL
(
lua_pushvalue
)
FF_LIBRARY_SYMBOL
(
lua_rawgeti
)
FF_LIBRARY_SYMBOL
(
lua_rawlen
)
FF_LIBRARY_SYMBOL
(
lua_setfield
)
FF_LIBRARY_SYMBOL
(
lua_setglobal
)
FF_LIBRARY_SYMBOL
(
lua_seti
)
FF_LIBRARY_SYMBOL
(
lua_settop
)
FF_LIBRARY_SYMBOL
(
lua_toboolean
)
FF_LIBRARY_SYMBOL
(
lua_tointegerx
)
FF_LIBRARY_SYMBOL
(
lua_tolstring
)
FF_LIBRARY_SYMBOL
(
lua_tonumberx
)
FF_LIBRARY_SYMBOL
(
lua_type
)
#endif
lua_State
*
L
;
bool
inited
;
}
luaData
;
#if
!
FF_DISABLE_DLOPEN
[[
gnu
::
always_inline
]]
void
(
lua_settop
)(
lua_State
*
L
,
int
idx
) {
return
luaData
.
fflua_settop
(
L
,
idx
);
}
[[
gnu
::
always_inline
]]
int
(
luaL_loadbufferx
)(
lua_State
*
L
,
const
char
*
buff
,
size_t
sz
,
const
char
*
name
,
const
char
*
mode
) {
return
luaData
.
ffluaL_loadbufferx
(
L
,
buff
,
sz
,
name
,
mode
);
}
[[
gnu
::
always_inline
]]
const
char
*
(
lua_tolstring
) (
lua_State
*
L
,
int
idx
,
size_t
*
len
) {
return
luaData
.
fflua_tolstring
(
L
,
idx
,
len
);
}
[[
gnu
::
always_inline
]]
void
(
lua_createtable
)(
lua_State
*
L
,
int
narr
,
int
nrec
) {
return
luaData
.
fflua_createtable
(
L
,
narr
,
nrec
);
}
[[
gnu
::
always_inline
]]
void
(
lua_pushinteger
)(
lua_State
*
L
,
lua_Integer
n
) {
return
luaData
.
fflua_pushinteger
(
L
,
n
);
}
[[
gnu
::
always_inline
]]
void
(
lua_pushnumber
)(
lua_State
*
L
,
lua_Number
n
) {
return
luaData
.
fflua_pushnumber
(
L
,
n
);
}
[[
gnu
::
always_inline
]]
void
(
lua_pushboolean
)(
lua_State
*
L
,
int
b
) {
return
luaData
.
fflua_pushboolean
(
L
,
b
);
}
[[
gnu
::
always_inline
]]
const
char
*
(
lua_pushlstring
) (
lua_State
*
L
,
const
char
*
s
,
size_t
len
) {
return
luaData
.
fflua_pushlstring
(
L
,
s
,
len
);
}
[[
gnu
::
always_inline
]]
void
(
lua_pushvalue
)(
lua_State
*
L
,
int
idx
) {
return
luaData
.
fflua_pushvalue
(
L
,
idx
);
}
[[
gnu
::
always_inline
]]
void
(
lua_seti
)(
lua_State
*
L
,
int
idx
,
lua_Integer
n
) {
return
luaData
.
fflua_seti
(
L
,
idx
,
n
);
}
[[
gnu
::
always_inline
]]
void
(
lua_pushnil
)(
lua_State
*
L
) {
return
luaData
.
fflua_pushnil
(
L
);
}
[[
gnu
::
always_inline
]]
void
(
lua_setfield
)(
lua_State
*
L
,
int
idx
,
const
char
*
k
) {
return
luaData
.
fflua_setfield
(
L
,
idx
,
k
);
}
[[
gnu
::
always_inline
]]
int
(
lua_pcallk
)(
lua_State
*
L
,
int
nargs
,
int
nresults
,
int
errfunc
,
lua_KContext
ctx
,
lua_KFunction
k
) {
return
luaData
.
fflua_pcallk
(
L
,
nargs
,
nresults
,
errfunc
,
ctx
,
k
);
}
[[
gnu
::
always_inline
]]
int
(
lua_gettop
)(
lua_State
*
L
) {
return
luaData
.
fflua_gettop
(
L
);
}
[[
gnu
::
always_inline
]]
const
char
*
(
luaL_tolstring
) (
lua_State
*
L
,
int
idx
,
size_t
*
len
) {
return
luaData
.
ffluaL_tolstring
(
L
,
idx
,
len
);
}
[[
gnu
::
always_inline
]]
int
(
lua_error
)(
lua_State
*
L
) {
return
luaData
.
fflua_error
(
L
);
}
[[
gnu
::
always_inline
]]
void
(
lua_pushcclosure
)(
lua_State
*
L
,
lua_CFunction
fn
,
int
n
) {
return
luaData
.
fflua_pushcclosure
(
L
,
fn
,
n
);
}
[[
gnu
::
always_inline
]]
void
(
luaL_checkany
)(
lua_State
*
L
,
int
idx
) {
return
luaData
.
ffluaL_checkany
(
L
,
idx
);
}
[[
gnu
::
always_inline
]]
void
(
lua_callk
)(
lua_State
*
L
,
int
nargs
,
int
nresults
,
lua_KContext
ctx
,
lua_KFunction
k
) {
return
luaData
.
fflua_callk
(
L
,
nargs
,
nresults
,
ctx
,
k
);
}
[[
gnu
::
always_inline
]]
int
(
lua_isinteger
)(
lua_State
*
L
,
int
idx
) {
return
luaData
.
fflua_isinteger
(
L
,
idx
);
}
[[
gnu
::
always_inline
]]
int
(
lua_next
)(
lua_State
*
L
,
int
idx
) {
return
luaData
.
fflua_next
(
L
,
idx
);
}
[[
gnu
::
always_inline
]]
int
(
lua_rawgeti
)(
lua_State
*
L
,
int
idx
,
lua_Integer
n
) {
return
luaData
.
fflua_rawgeti
(
L
,
idx
,
n
);
}
[[
gnu
::
always_inline
]]
#if
LUA_VERSION_NUM
>
503
lua_Unsigned
#else
size_t
#endif
(
lua_rawlen
)(
lua_State
*
L
,
int
idx
) {
return
luaData
.
fflua_rawlen
(
L
,
idx
);
}
[[
gnu
::
always_inline
]]
void
(
lua_setglobal
)(
lua_State
*
L
,
const
char
*
name
) {
return
luaData
.
fflua_setglobal
(
L
,
name
);
}
[[
gnu
::
always_inline
]]
int
(
lua_toboolean
)(
lua_State
*
L
,
int
idx
) {
return
luaData
.
fflua_toboolean
(
L
,
idx
);
}
[[
gnu
::
always_inline
]]
lua_Integer
(
lua_tointegerx
)(
lua_State
*
L
,
int
idx
,
int
*
isnum
) {
return
luaData
.
fflua_tointegerx
(
L
,
idx
,
isnum
);
}
[[
gnu
::
always_inline
]]
lua_Number
(
lua_tonumberx
)(
lua_State
*
L
,
int
idx
,
int
*
isnum
) {
return
luaData
.
fflua_tonumberx
(
L
,
idx
,
isnum
);
}
[[
gnu
::
always_inline
]]
int
(
lua_type
)(
lua_State
*
L
,
int
idx
) {
return
luaData
.
fflua_type
(
L
,
idx
);
}
#endif
const
char
*
ffLuaLoadState
(
void
);
#endif
Back
|
FazBrowse Home
|
New Git URL