20 Commits (3bf903c3984c0b8858e60668787452cd08eae6f4)

Author SHA1 Message Date
Stefan Bühler 3bf903c398 [lua] provide and use li_lua_new_protected_metatable to prevent tampering with metatables
Change-Id: Ifda5a1465c8fc291f0f09490a9f6e2c3f6b27504
2 years ago
Stefan Bühler 17a5168793 [core] convert all assert() to LI_FORCE_ASSERT(), and support writing backtraces on fatal errors with libunwind 9 years ago
Stefan Bühler db58828e0b [common] refactor liValue to share most of the code
* removing unused "range" value type in angel
9 years ago
Stefan Bühler e76ebe2021 [core] rewrite config parser
* no more hash values - only lists and list of key-value pairs
 * "master" config:
   the config loaded on startup can use all features,
   configs loaded later (vhost on demand from sql...) can't use
   include* and cannot modify global vars.
 * scoped variables
   - add a global var store in the server struct
   - global vars can be set with "global foo = bar"
   - if a variable already exists in a scope it will be modified on a
	 write, otherwise a new local variable is created
   - global vars won't be modified if not in "master" mode
   - vars can be made explicitly local with "local foo = bar"; create a
	 local copy with "local foo = foo"
   - globals vars are available in live config loads for reading
   - each file and action block {...} creates a new scope; if/else branches do
	 NOT create a new scope
 * to append a value to a list use "l + [v]" (not "l + v" anymore);
   lists are concatenated with "+"
 * [...] always marks a list
 * (...) is a list if it contains a "," or "=>", otherwise it justs
   groups an expression
 * a list can either contain key-value pairs or other values. mixing is
   not allowed
10 years ago
Stefan Bühler 061b2a4262 [core] handle differences between options/actions/setups in plugin.c 10 years ago
Stefan Bühler 0d85a068c8 [lua] add per lua_State lock 10 years ago
Stefan Bühler c1851a6cea [lua] force garbage collection 10 years ago
Stefan Bühler 9cb0790052 [core_lua] Forward worker pointer to log functions in some lua functions
This fixes 2 things:
 * won't need global server lock for logging in worker context
 * order of log entries; worker context log gets committed to
   global list in the event loop
10 years ago
Stefan Bühler a8efcfcc0e modify plugin api to include worker context for action/option parsing; add per-worker callback for stop_worker
* create main_worker earlier
13 years ago
Stefan Bühler e0370fac79 Fix some lua handling; add args for lua plugins/handlers 13 years ago
Stefan Bühler fe7ddede88 Add lua plugins 14 years ago
Stefan Bühler b4c3e2ba02 Add userdata to action-create, setup and plugin-init callbacks 14 years ago
Stefan Bühler d9228f3ef0 Add per worker lua_State 14 years ago
Stefan Bühler a151eeac2f Prefix li_ cleanup, verified with nm -g --defined-only 14 years ago
Stefan Bühler 476698f118 luaApi: move global method/constants into lighty. namespace, add vr:stat(filename) 14 years ago
Stefan Bühler aadbf51c84 Fix two more leaks, add some safe = NULL inits, free ssl error strings 14 years ago
Stefan Bühler a687b03638 Add boolean conditionals to lua 14 years ago
Stefan Bühler 39a879f89a Add "include_lua" to config special commands if compiled with lua 14 years ago
Stefan Bühler 659ebfdd16 Add core lua support to handle requests 14 years ago
Stefan Bühler 540ff7db02 Split sources into subdirs 14 years ago