mod_lua.h revision 7bf1401ef4bee095f2f6ce59519e0a6c1018324f
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * Licensed to the Apache Software Foundation (ASF) under one or more
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * contributor license agreements. See the NOTICE file distributed with
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * this work for additional information regarding copyright ownership.
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * The ASF licenses this file to You under the Apache License, Version 2.0
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * (the "License"); you may not use this file except in compliance with
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * the License. You may obtain a copy of the License at
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * Unless required by applicable law or agreed to in writing, software
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * distributed under the License is distributed on an "AS IS" BASIS,
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * See the License for the specific language governing permissions and
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * limitations under the License.
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak/* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * AP_LUA_DECLARE_DATA with appropriate export and import tags for the platform
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak#if !defined(WIN32)
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak#define AP_LUA_DECLARE(type) __declspec(dllexport) type __stdcall
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak#define AP_LUA_DECLARE_NONSTD(type) __declspec(dllexport) type
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak#define AP_LUA_DECLARE(type) __declspec(dllimport) type __stdcall
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak#define AP_LUA_DECLARE_NONSTD(type) __declspec(dllimport) type
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * make a userdata out of a C pointer, and vice versa
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * instead of using lightuserdata
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak#define lua_boxpointer(L,u) (*(void **)(lua_newuserdata(L, sizeof(void *))) = (u))
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak#define lua_unboxpointer(L,i) (*(void **)(lua_touserdata(L, i)))
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniakvoid ap_lua_rstack_dump(lua_State *L, request_rec *r, const char *msg);
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniaktypedef struct
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * mapped handlers
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak * APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_SERVER
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak unsigned int vm_scope;
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak /* info for the hook harnesses */
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak /* the actual directory being configured */
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniaktypedef struct
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak /* value of the LuaRoot directive */
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniaktypedef struct
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniaktypedef struct
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniaktypedef struct
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniakAPR_DECLARE_EXTERNAL_HOOK(ap_lua, AP_LUA, int, lua_open,
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniakAPR_DECLARE_EXTERNAL_HOOK(ap_lua, AP_LUA, int, lua_request,
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniakAP_LUA_DECLARE(const char *) ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *var);
f21bea4c0f58e17aa1d9a0fac2c219852f89944amaczniak#endif /* !_MOD_LUA_H_ */