Commit Graph

55 Commits

Author SHA1 Message Date
Dmitri Chudinov 1704758e79 elua: move err label to ENABLE_LUA_OLD defined branch 2023-12-19 04:26:58 -08:00
Daniel Kolesa 5ed0161564 elua: add searchpath impl for 5.1 compat 2020-07-31 19:01:59 +02:00
Daniel Kolesa 86ee71ce4d elua: do not link to cffi, load the module instead 2020-07-31 19:01:53 +02:00
Daniel Kolesa 48c8eb835e elua: use cffi-lua public header 2020-05-30 06:44:29 +02:00
Daniel Kolesa 5197200ac1 elua: allow building with interpreted (non-luajit) lua
This doesn't fully work yet as e.g. Eolian bindings require
the bitop module only present in luajit for now.

In order to build, you will need to install

https://github.com/q66/cffi-lua

in order to provide the FFI. It needs to be built for the Lua
version you are building EFL with.
2020-05-29 16:40:05 +02:00
Daniel Kolesa b8f28e2a99 elua: get rid of lightuserdata for state retrieval
In order to get around the lightuserdata 48-bit problem, split
the state pointer into two and reconstruct it later as necessary.
2018-04-13 15:40:05 +02:00
Daniel Kolesa 40214e16c7 elua: correctly wrap gettext funcs
Now, we cannot directly register funcs defined by a different
signature than the lua standard (int (*)(lua_State *)) so we
have to correctly wrap those with proper conversions etc.
2017-11-24 10:55:46 +01:00
Carsten Haitzler 6587613a58 elua - use safeptr with lightuserdata to work around luajit 64bit issue
luajit only supports 47bits on 64bit for lightuser data (bad! don't
mess with opaque pointers... really unexpected and bad and probably
should be fixed in luajit by doing things like on 32bit where
pointers are not messed with etc.)
2017-11-24 18:29:23 +09:00
Daniel Kolesa 352c044524 elua: use up to date lua API
luaL_reg is a 5.0 API which we don't support.
2017-06-28 11:51:29 +02:00
Daniel Kolesa d27c27528c elua: load modules from local dirs first
This fixes cases when running scripts locally - local modules
are preferred over systemwide, avoiding possibly outdated system
scripts from being run.
2016-08-08 14:38:39 +01:00
Daniel Kolesa 0d126eab35 elua: enable module lookups in apps location
This will allow for better organization of the docgen script.
2016-07-19 16:19:42 +01:00
Daniel Kolesa 7a9fbd27ab elua: more file utilities in clib 2016-04-16 18:15:57 +01:00
Daniel Kolesa 18c208c7f9 elua: add several file/dir utils used by doc gen
This will be expanded into a proper util lib later.
2016-03-29 13:23:58 +01:00
Vincent Torri 3b44645363 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01:00
Daniel Kolesa a3cec656c8 elua: remove non-portable lconv fields (breaks windows) 2015-10-19 11:52:03 +01:00
Daniel Kolesa b90c1bf90e elua lib: sanitize all file paths before writing them
This will prevent random nonsense from being written in.

It changes semantics slightly (documented) and also fixes
CID 1267463.

@fix
2015-06-09 14:01:25 +01:00
Cedric BAIL e1dee32e26 elua: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Daniel Kolesa 7cc295ae9a elua lib: use -1 for default values in localeconv 2015-05-06 15:05:23 +01:00
Daniel Kolesa 490deb9328 elua lib: add API to retrieve lconv from lua 2015-05-06 15:05:23 +01:00
Daniel Kolesa 3a685d40c0 elua lib: add a func to retrieve the current translation lang 2015-05-06 15:05:23 +01:00
Daniel Kolesa 093c7aa596 elua lib: remove unnecessary checks (always initialized) 2015-05-06 15:05:23 +01:00
Daniel Kolesa db66fe6255 elua lib: fix elua_util_app_load + docs 2015-05-06 15:05:23 +01:00
Daniel Kolesa e73f7f7a40 elua lib: use Eina_Bool as return val in some utils 2015-05-06 15:05:23 +01:00
Daniel Kolesa 88faba813c elua lib: merge the 3 setup funcs into one
This allows simpler initialization and elua_util_require
can now queue up modules before full initialization is done.
2015-05-06 15:05:23 +01:00
Daniel Kolesa 660a4d7e1c elua lib: docs for elua_util_error_report + remove unnecessary arg 2015-05-06 15:05:22 +01:00
Daniel Kolesa 7cb8d13980 elua lib: hide some APIs that should not be public 2015-05-06 15:05:21 +01:00
Daniel Kolesa e77ba60a58 elua lib: tests for core dirs + fix core dirs 2015-05-06 15:05:21 +01:00
Daniel Kolesa 7f05cfc0e6 elua lib: error_report is now in util namespace 2015-05-06 15:05:20 +01:00
Daniel Kolesa f8f9cc14a7 elua lib: API rename 2015-05-06 15:05:20 +01:00
Daniel Kolesa d8890209af elua lib: unify API conventions 2015-05-06 15:05:20 +01:00
Daniel Kolesa 24a694026a elua lib: add elua_state_setup_modules + use 2015-05-06 15:05:20 +01:00
Daniel Kolesa 8041b042fe elua lib: move i18n initialization there 2015-05-06 15:05:20 +01:00
Daniel Kolesa 0496762057 elua: utilize the new elua_util APIs 2015-05-06 15:05:20 +01:00
Daniel Kolesa 5aca5e13a1 elua lib: add elua_util_ APIs 2015-05-06 15:05:20 +01:00
Daniel Kolesa e806ae6f5c elua lib: add a way to retrieve the progname 2015-05-06 15:05:20 +01:00
Daniel Kolesa 13bd7ba653 elua lib: add progname to state 2015-05-06 15:05:20 +01:00
Daniel Kolesa 18da22a468 elua lib: add APIs to retrieve refs to require/appload 2015-05-06 15:05:20 +01:00
Daniel Kolesa 6be9b662fb elua lib: add APIs for include path management 2015-05-06 15:05:19 +01:00
Daniel Kolesa 5f6109bc47 elua: new API elua_state_dirs_fill + utilize 2015-05-06 15:05:19 +01:00
Daniel Kolesa 329fae97b0 elua lib: manage bound modules within Elua_State 2015-05-06 15:05:19 +01:00
Daniel Kolesa b563ae007e elua lib: add elua_state_lua_state_get 2015-05-06 15:05:19 +01:00
Daniel Kolesa 51a5d09018 elua lib: const correctness 2015-05-06 15:05:19 +01:00
Daniel Kolesa 19bb7eb460 elua lib: new APIs to retrieve dirs 2015-05-06 15:05:19 +01:00
Daniel Kolesa e4baa1bc12 elua lib: use eina safety checks 2015-05-06 15:05:19 +01:00
Daniel Kolesa ed3f24943f elua lib: add elua_state_dirs_set 2015-05-06 15:05:19 +01:00
Daniel Kolesa cf98f846e9 elua lib: Elua_State for elua_state_setup_i18n 2015-05-06 15:05:18 +01:00
Daniel Kolesa c1487c8b11 elua: elua_report_error now takes Elua_State* 2015-05-06 15:05:18 +01:00
Daniel Kolesa 357d902b87 elua lib: add elua_state_from_lua_get 2015-05-06 15:05:18 +01:00
Daniel Kolesa bf4837dbbf elua lib: add elua_state_new and elua_state_free 2015-05-06 15:05:18 +01:00
Daniel Kolesa 208ad62d3c elua: error reporting in the library 2014-12-17 14:44:12 +00:00