You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pg...@apache.org on 2008/11/09 21:00:53 UTC
svn commit: r712545 - /httpd/mod_wombat/trunk/request.c
Author: pgollucci
Date: Sun Nov 9 12:00:53 2008
New Revision: 712545
URL: http://svn.apache.org/viewvc?rev=712545&view=rev
Log:
s,check_request_rec,apw_check_request_rec,g in request.c
Noticed by: ApacheCon2008 US presentation
Modified:
httpd/mod_wombat/trunk/request.c
Modified: httpd/mod_wombat/trunk/request.c
URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/request.c?rev=712545&r1=712544&r2=712545&view=diff
==============================================================================
--- httpd/mod_wombat/trunk/request.c (original)
+++ httpd/mod_wombat/trunk/request.c Sun Nov 9 12:00:53 2008
@@ -86,7 +86,7 @@
* userdata thingamajig and return it if it is. if it is not
* lua will enter its error handling routine.
*/
-static request_rec* check_request_rec(lua_State* L, int index) {
+static request_rec* apw_check_request_rec(lua_State* L, int index) {
luaL_checkudata(L, index, "Apache2.Request");
request_rec* r = (request_rec*)lua_unboxpointer(L, index);
return r;
@@ -138,7 +138,7 @@
// r:parseargs() returning a lua table
static int req_parseargs(lua_State* L) {
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
apreq_handle_t* h = apreq_handle_apache2(r);
lua_newtable(L);
lua_newtable(L); // [table, table]
@@ -151,7 +151,7 @@
// wrap ap_rputs as r:puts(String)
static int req_puts(lua_State* L) {
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
int argc = lua_gettop(L);
int i;
@@ -164,7 +164,7 @@
// wrap ap_rwrite as r:write(String)
static int req_write(lua_State* L) {
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
size_t n;
const char* buf = luaL_checklstring(L, 2, &n);
@@ -174,7 +174,7 @@
// r:parsebody()
static int req_parsebody(lua_State* L) {
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
apreq_handle_t* h = apreq_handle_apache2(r);
lua_newtable(L);
lua_newtable(L);
@@ -187,7 +187,7 @@
// r:addoutputfilter(name|function)
static int req_add_output_filter(lua_State *L) {
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
const char *name = luaL_checkstring(L, 2);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "adding output filter %s", name);
ap_add_output_filter(name, L, r, r->connection);
@@ -195,7 +195,7 @@
}
static int req_document_root(lua_State* L) {
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
char* doc_root = apr_pstrdup(r->pool, ap_document_root(r));
lua_pushstring(L, doc_root);
return 1;
@@ -274,7 +274,7 @@
/* END dispatch mathods for request_rec fields */
static int req_dispatch(lua_State* L) {
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
const char *name = luaL_checkstring(L, 2);
lua_pop(L, 2);
@@ -332,7 +332,7 @@
// helper function for the logging functions below
static int req_log_at(lua_State* L, int level) {
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
lua_Debug dbg;
lua_getstack(L, 1, &dbg);
@@ -357,7 +357,7 @@
static int req_newindex(lua_State* L) {
// request_rec* r = lua_touserdata(L, lua_upvalueindex(1));
// const char* key = luaL_checkstring(L, -2);
- request_rec* r = check_request_rec(L, 1);
+ request_rec* r = apw_check_request_rec(L, 1);
rstack_dump(L, r, "req_newindex");
const char *key = luaL_checkstring(L, 2);
rstack_dump(L, r, "req_newindex");