/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*/
typedefvoid (*ap_lua_state_open_callback) (lua_State *L, apr_pool_t *p, void *ctx); /** * Specification for a lua virtual machine
*/ typedefstruct
{ /* NEED TO ADD ADDITIONAL PACKAGE PATHS AS PART OF SPEC INSTEAD OF DIR CONFIG */
apr_array_header_t *package_paths;
apr_array_header_t *package_cpaths;
/* name of base file to load in the vm */ constchar *file;
/* pool to use for lifecycle if APL_SCOPE_ONCE is set, otherwise unused */
apr_pool_t *pool;
/* Pre-compiled Lua Byte code to load directly. If bytecode_len is >0, * the file part of this structure is ignored for loading purposes, but * it is used for error messages.
*/ constchar *bytecode;
apr_size_t bytecode_len;
int codecache;
} ap_lua_vm_spec;
typedefstruct
{ constchar *function_name; constchar *file_name; int scope;
ap_regex_t *uri_pattern; constchar *bytecode;
apr_size_t bytecode_len; int codecache;
} ap_lua_mapped_handler_spec;
/** * Fake out addition of the "apache2" module
*/ void ap_lua_load_apache2_lmodule(lua_State *L);
/* * alternate means of getting lua_State (preferred eventually) * Obtain a lua_State which has loaded file and is associated with lifecycle_pool * If one exists, will return extant one, otherwise will create, attach, and return * This does no locking around the lua_State, so if the pool is shared between * threads, locking is up the client. * * @lifecycle_pool -> pool whose lifeycle controls the lua_State * @file file to be opened, also used as a key for uniquing lua_States * @cb callback for vm initialization called *before* the file is opened * @ctx a baton passed to cb
*/
lua_State *ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
ap_lua_vm_spec *spec, request_rec* r);
#if APR_HAS_THREADS || defined(DOXYGEN) /* * Initialize mod_lua mutex. * @pool pool for mutex * @s server_rec for logging
*/ void ap_lua_init_mutex(apr_pool_t *pool, server_rec *s); #endif
#endif
¤ Dauer der Verarbeitung: 0.25 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.