~ubuntu-branches/ubuntu/trusty/grub2/trusty

« back to all changes in this revision

Viewing changes to debian/grub-extras/lua/linit.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-16 15:18:04 UTC
  • mfrom: (17.6.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140116151804-3foouk7fpqcq3sxx
Tags: 2.02~beta2-2
* Convert patch handling to git-dpm.
* Add bi-endian support to ELF parser (Tomohiro B Berry).
* Adjust restore_mkdevicemap.patch to mark get_kfreebsd_version as static,
  to appease "gcc -Werror=missing-prototypes".
* Cherry-pick from upstream:
  - Change grub-macbless' manual page section to 8.
* Install grub-glue-efi, grub-macbless, grub-render-label, and
  grub-syslinux2cfg.
* grub-shell: Pass -no-pad to xorriso when building floppy images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $
 
3
** Initialization of libraries for lua.c
 
4
** See Copyright Notice in lua.h
 
5
*/
 
6
 
 
7
 
 
8
#define linit_c
 
9
#define LUA_LIB
 
10
 
 
11
#include "lua.h"
 
12
 
 
13
#include "lualib.h"
 
14
#include "lauxlib.h"
 
15
 
 
16
 
 
17
static const luaL_Reg lualibs[] = {
 
18
  {"", luaopen_base},
 
19
//  {LUA_LOADLIBNAME, luaopen_package},
 
20
  {LUA_TABLIBNAME, luaopen_table},
 
21
//  {LUA_IOLIBNAME, luaopen_io},
 
22
//  {LUA_OSLIBNAME, luaopen_os},
 
23
  {LUA_STRLIBNAME, luaopen_string},
 
24
//  {LUA_MATHLIBNAME, luaopen_math},
 
25
//  {LUA_DBLIBNAME, luaopen_debug},
 
26
  {NULL, NULL}
 
27
};
 
28
 
 
29
 
 
30
LUALIB_API void luaL_openlibs (lua_State *L) {
 
31
  const luaL_Reg *lib = lualibs;
 
32
  for (; lib->func; lib++) {
 
33
    lua_pushcfunction(L, lib->func);
 
34
    lua_pushstring(L, lib->name);
 
35
    lua_call(L, 1, 0);
 
36
  }
 
37
}
 
38