Lines Matching refs:spec

68     ap_lua_vm_spec *spec;
72 lua_authz_provider_spec *spec;
82 ap_lua_vm_spec *spec;
152 static void ap_lua_release_state(lua_State* L, ap_lua_vm_spec* spec, request_rec* r) {
155 if (spec->scope == AP_LUA_SCOPE_SERVER) {
160 hash = apr_psprintf(r->pool, "reslist:%s", spec->file);
182 ap_lua_vm_spec *spec = apr_pcalloc(r->pool, sizeof(ap_lua_vm_spec));
184 spec->scope = cfg->vm_scope;
185 spec->pool = r->pool;
186 spec->package_paths = cfg->package_paths;
187 spec->package_cpaths = cfg->package_cpaths;
188 spec->cb = &lua_open_callback;
189 spec->cb_arg = NULL;
190 spec->bytecode = bytecode;
191 spec->bytecode_len = bytecode_len;
192 spec->codecache = (cfg->codecache == AP_LUA_CACHE_UNSET) ? AP_LUA_CACHE_STAT : cfg->codecache;
193 spec->vm_min = cfg->vm_min ? cfg->vm_min : 1;
194 spec->vm_max = cfg->vm_max ? cfg->vm_max : 1;
200 spec->file = file;
203 spec->file = r->filename;
207 what, scope_to_string(spec->scope), spec->file,
210 switch (spec->scope) {
234 return spec;
298 ap_lua_vm_spec *spec = create_vm_spec(&pool, r, cfg, NULL, NULL, NULL,
301 L = ap_lua_get_lua_state(pool, spec, r);
303 /* TODO annotate spec with failure reason */
306 ap_lua_release_state(L, spec, r);
315 spec->file);
316 ap_lua_release_state(L, spec, r);
326 ap_lua_release_state(L, spec, r);
337 ap_lua_vm_spec *spec;
361 spec = create_vm_spec(&pool, r, cfg, server_cfg,
367 L = ap_lua_get_lua_state(pool, spec, r);
376 ap_lua_release_state(L, spec, r);
386 ap_lua_release_state(L, spec, r);
401 ctx->spec = spec;
417 ap_lua_release_state(L, spec, r);
503 ap_lua_release_state(L, ctx->spec, r);
531 ap_lua_release_state(L, ctx->spec, r);
626 ap_lua_release_state(L, ctx->spec, r);
646 ap_lua_release_state(L, ctx->spec, r);
662 ap_lua_vm_spec *spec;
679 spec = create_vm_spec(&pool, r, cfg, server_cfg,
686 L = ap_lua_get_lua_state(pool, spec, r);
702 ap_lua_release_state(L, spec, r);
719 ap_lua_release_state(L, spec, r);
734 ap_lua_release_state(L, spec, r);
737 ap_lua_release_state(L, spec, r);
777 ap_lua_vm_spec *spec;
800 spec = create_vm_spec(&pool, r, cfg, server_cfg,
806 L = ap_lua_get_lua_state(pool, spec, r);
812 ap_lua_release_state(L, spec, r);
823 ap_lua_release_state(L, spec, r);
840 ap_lua_release_state(L, spec, r);
854 ap_lua_release_state(L, spec, r);
956 ap_lua_mapped_handler_spec *spec;
987 baton->spec->scope = cfg->vm_scope;
989 *(ap_lua_mapped_handler_spec **) apr_array_push(hook_specs) = baton->spec;
1000 ap_lua_mapped_handler_spec *spec;
1032 spec = apr_pcalloc(cmd->pool, sizeof(ap_lua_mapped_handler_spec));
1042 spec->file_name = apr_psprintf(cmd->pool, "%s:%u",
1046 spec->function_name = (char *) function;
1064 rv = lua_load(lvm, direct_chunkreader, &ctx, spec->file_name);
1081 spec->bytecode_len = lua_strlen(lvm, -1);
1082 spec->bytecode = apr_pstrmemdup(cmd->pool, lua_tostring(lvm, -1),
1083 spec->bytecode_len);
1096 baton->spec = spec;
1116 ap_lua_mapped_handler_spec *spec;
1128 spec = apr_pcalloc(cmd->pool, sizeof(ap_lua_mapped_handler_spec));
1129 spec->file_name = apr_pstrdup(cmd->pool, file);
1130 spec->function_name = apr_pstrdup(cmd->pool, function);
1131 spec->scope = cfg->vm_scope;
1133 *(ap_lua_mapped_handler_spec **) apr_array_push(hook_specs) = spec;
1142 ap_lua_mapped_handler_spec *spec;
1149 spec = apr_pcalloc(cmd->pool, sizeof(ap_lua_mapped_handler_spec));
1150 spec->file_name = apr_pstrdup(cmd->pool, file);
1151 spec->function_name = apr_pstrdup(cmd->pool, function);
1152 spec->scope = cfg->vm_scope;
1153 spec->uri_pattern = regex;
1155 *(ap_lua_mapped_handler_spec **) apr_array_push(cfg->mapped_handlers) = spec;
1165 ap_lua_filter_handler_spec *spec;
1168 spec = apr_pcalloc(cmd->pool, sizeof(ap_lua_filter_handler_spec));
1169 spec->file_name = apr_pstrdup(cmd->pool, file);
1170 spec->function_name = apr_pstrdup(cmd->pool, function);
1171 spec->filter_name = filter;
1173 *(ap_lua_filter_handler_spec **) apr_array_push(cfg->mapped_filters) = spec;
1176 spec->direction = AP_LUA_FILTER_OUTPUT;
1181 spec->direction = AP_LUA_FILTER_INPUT;
1702 lua_authz_provider_spec *spec;
1709 spec = apr_hash_get(lua_authz_providers, provider_name, APR_HASH_KEY_STRING);
1710 ap_assert(spec != NULL);
1711 func->spec = spec;
1729 ap_lua_vm_spec *spec;
1736 const lua_authz_provider_spec *prov_spec = prov_func->spec;
1740 spec = create_vm_spec(&pool, r, cfg, server_cfg, prov_spec->file_name,
1743 L = ap_lua_get_lua_state(pool, spec, r);
1754 ap_lua_release_state(L, spec, r);
1763 ap_lua_release_state(L, spec, r);
1776 ap_lua_release_state(L, spec, r);
1782 ap_lua_release_state(L, spec, r);
1786 ap_lua_release_state(L, spec, r);
1812 lua_authz_provider_spec *spec;
1817 spec = apr_pcalloc(cmd->pool, sizeof(*spec));
1818 spec->name = name;
1819 spec->file_name = file;
1820 spec->function_name = function;
1822 apr_hash_set(lua_authz_providers, name, APR_HASH_KEY_STRING, spec);