pushGlobal method

void pushGlobal(
  1. dynamic key
)

Pushes the global variable from a key to the stack.

This is equivalent to:

state.pushGlobalTable();
state.push(key);
state.tableGet();
state.remove(-2);

Implementation

void pushGlobal(dynamic key) {
  lua_pushglobaltable(L);
  push(key);
  tableGet();
  remove(-2);
}