Loading...
Searching...
No Matches
lua_builtin.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
25#ifndef LUA_BUILTIN_H
26#define LUA_BUILTIN_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/* Avoid compilation errors where there are no external modules defined */
38#define WEAK __attribute__((weak))
39
44#define LUAR_MAX_MODULE_NAME 64
45
51 const char *name;
52 const uint8_t *code;
53 size_t code_size;
54};
55
61 const char *name;
62 int (*luaopen)(lua_State *);
66};
67
71extern WEAK const size_t lua_riot_builtin_lua_table_len;
72
74extern WEAK const struct lua_riot_builtin_c *const lua_riot_builtin_c_table;
76extern WEAK const size_t lua_riot_builtin_c_table_len;
77
78#ifdef __cplusplus
79extern "C" }
80#endif
81
82#endif /* LUA_BUILTIN_H */
83
WEAK const struct lua_riot_builtin_lua *const lua_riot_builtin_lua_table
Table containing all built in pure lua modules.
WEAK const size_t lua_riot_builtin_c_table_len
Number of elements of lua_riot_builtin_c_table.
WEAK const struct lua_riot_builtin_c *const lua_riot_builtin_c_table
Table containing all built in c lua modules.
WEAK const size_t lua_riot_builtin_lua_table_len
Number of elements of lua_riot_builtin_lua_table.
#define WEAK
Attribute to make symbols weak.
Definition lua_builtin.h:38
Entry describing a c lua module built into the application binary.
Definition lua_builtin.h:60
const char * name
Definition lua_builtin.h:61
int(* luaopen)(lua_State *)
Definition lua_builtin.h:62
Entry describing a pure lua module whose source is built into the application binary.
Definition lua_builtin.h:50
const uint8_t * code
Definition lua_builtin.h:52
const char * name
Definition lua_builtin.h:51