Beispiel #1
0
 void initialize_scoped_ptr(lua_State* L) {
   lua_newtable(L);
   {
     luaX_set_field(L, -1, "test", impl_test);
   }
   luaX_set_field(L, -2, "scoped_ptr");
 }
 void initialize_sth_column(lua_State* L) {
   luaX_set_field(L, -1, "column_count", impl_column_count);
   luaX_set_field(L, -1, "column_name", impl_column_name);
   luaX_set_field(L, -1, "column_type", impl_column_type);
   luaX_set_field(L, -1, "column", impl_column);
   luaX_set_field(L, -1, "columns", impl_columns);
 }
Beispiel #3
0
  void initialize_sys_mman(lua_State* L) {
    luaX_set_field(L, -1, "mlockall", impl_mlockall);
    luaX_set_field(L, -1, "munlockall", impl_munlockall);
    luaX_set_field(L, -1, "reserve_stack_pages", impl_reserve_stack_pages);

    luaX_set_field(L, -1, "MCL_CURRENT", MCL_CURRENT);
    luaX_set_field(L, -1, "MCL_FUTURE", MCL_FUTURE);
  }
  void initialize_vm_configuration(lua_State* L) {
    lua_newtable(L);
    {
      inherit_handle(L, "dromozoa.prl.vm_configuration");
      luaX_set_field(L, -1, "get_name", impl_get_name);
    }
    luaX_set_field(L, -2, "vm_configuration");

    initialize_virtual_machine(L);
  }
Beispiel #5
0
 void initialize_selfpipe(lua_State* L) {
   lua_newtable(L);
   {
     luaX_set_field(L, -1, "open", impl_open);
     luaX_set_field(L, -1, "close", impl_close);
     luaX_set_field(L, -1, "get", impl_get);
     luaX_set_field(L, -1, "read", impl_read);
   }
   luaX_set_field(L, -2, "selfpipe");
 }
Beispiel #6
0
inline void luaX_set_metafield(lua_State* L, int index, const T_key& key, const T& value) {
    index = luaX_abs_index(L, index);
    if (!lua_getmetatable(L, index)) {
        lua_newtable(L);
    }
    luaX_set_field(L, -1, key, value);
    lua_setmetatable(L, index);
}
Beispiel #7
0
  void initialize_dbh(lua_State* L) {
    lua_newtable(L);
    {
      luaL_newmetatable(L, "dromozoa.sqlite3.dbh");
      lua_pushvalue(L, -2);
      luaX_set_field(L, -2, "__index");
      luaX_set_field(L, -1, "__gc", impl_gc);
      lua_pop(L, 1);

      luaX_set_field(L, -1, "close", impl_close);
      luaX_set_field(L, -1, "busy_timeout", impl_busy_timeout);
      luaX_set_field(L, -1, "prepare", impl_prepare);
      luaX_set_field(L, -1, "exec", impl_exec);
      luaX_set_field(L, -1, "changes", impl_changes);
      luaX_set_field(L, -1, "last_insert_rowid", impl_last_insert_rowid);

      initialize_dbh_function(L);
    }
    luaX_set_field(L, -2, "dbh");
  }
Beispiel #8
0
  void initialize_sth(lua_State* L) {
    lua_newtable(L);
    {
      luaL_newmetatable(L, "dromozoa.sqlite3.sth");
      lua_pushvalue(L, -2);
      luaX_set_field(L, -2, "__index");
      luaX_set_field(L, -1, "__gc", impl_gc);
      lua_pop(L, 1);

      luaX_set_field(L, -1, "finalize", impl_finalize);
      luaX_set_field(L, -1, "step", impl_step);
      luaX_set_field(L, -1, "reset", impl_reset);
      luaX_set_field(L, -1, "sql", impl_sql);

      initialize_sth_bind(L);
      initialize_sth_column(L);
    }
    luaX_set_field(L, -2, "sth");
  }
  void initialize_virtual_machine(lua_State* L) {
    lua_newtable(L);
    {
      if (PHT_VIRTUAL_MACHINE == PHT_VM_CONFIGURATION) {
        inherit_handle(L, "dromozoa.prl.virtual_machine", "dromozoa.prl.vm_configuration");
      } else {
        inherit_handle(L, "dromozoa.prl.virtual_machine");
      }

      luaX_set_field(L, -1, "connect_to_vm", impl_connect_to_vm);
      luaX_set_field(L, -1, "disconnect_from_vm", impl_disconnect_from_vm);
      luaX_set_field(L, -1, "get_config", impl_get_config);
      luaX_set_field(L, -1, "send_key_event_ex", impl_send_key_event_ex);
      luaX_set_field(L, -1, "send_key_pressed_and_released", impl_send_key_pressed_and_released);
    }
    luaX_set_field(L, -2, "virtual_machine");
  }
Beispiel #10
0
 void initialize_fd_statvfs(lua_State* L) {
   luaX_set_field(L, -1, "fstatvfs", impl_fstatvfs);
 }
Beispiel #11
0
  void initialize_sys_statvfs(lua_State* L) {
    luaX_set_field(L, -1, "statvfs", impl_statvfs);

    luaX_set_field<unsigned long>(L, -1, "ST_RDONLY", ST_RDONLY);
    luaX_set_field<unsigned long>(L, -1, "ST_NOSUID", ST_NOSUID);
  }
Beispiel #12
0
 void initialize_pathexec(lua_State* L) {
   luaX_set_field(L, -1, "pathexec", impl_pathexec);
 }