File: core.lua

package info (click to toggle)
lua-lgi 0.9.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,376 kB
  • sloc: ansic: 5,082; makefile: 169; sh: 31
file content (22 lines) | stat: -rw-r--r-- 761 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
------------------------------------------------------------------------------
--
--  lgi Lua-side core module selector
--
--  Copyright (c) 2010, 2011, 2015 Pavel Holejsovsky
--  Licensed under the MIT license:
--  http://www.opensource.org/licenses/mit-license.php
--
------------------------------------------------------------------------------

-- This module decides what kind of core routines should be loaded.
-- Currently only one implementation exists, standard-Lua C-side
-- implementation, LuaJIT-FFI-based one is planned.
local core = require 'lgi.corelgilua51'

-- Helper methods for converting between CamelCase and uscore_delim
-- names.
function core.uncamel(name)
   return core.downcase(name:gsub('([%l%d])([%u])', '%1_%2'))
end

return core