mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Debian doesn't like pushing statically defined functions into tables, so we'll declare them in lua_dbd.h and just make them regular functions instead.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1432418 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -56,7 +56,7 @@ static lua_db_result_set *lua_get_result_set(lua_State *L)
|
|||||||
db:close(): Closes an open database connection.
|
db:close(): Closes an open database connection.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_close(lua_State *L)
|
int lua_db_close(lua_State *L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_handle *db;
|
lua_db_handle *db;
|
||||||
@@ -84,14 +84,14 @@ static int lua_db_close(lua_State *L)
|
|||||||
lua_settop(L, 0);
|
lua_settop(L, 0);
|
||||||
lua_pushnumber(L, rc);
|
lua_pushnumber(L, rc);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============================================================================
|
=============================================================================
|
||||||
db:__gc(): Garbage collecting function.
|
db:__gc(): Garbage collecting function.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_gc(lua_State *L)
|
int lua_db_gc(lua_State *L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_handle *db;
|
lua_db_handle *db;
|
||||||
@@ -122,7 +122,7 @@ static int lua_db_gc(lua_State *L)
|
|||||||
db:active(): Returns true if the connection to the db is still active.
|
db:active(): Returns true if the connection to the db is still active.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_active(lua_State *L)
|
int lua_db_active(lua_State *L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_handle *db = 0;
|
lua_db_handle *db = 0;
|
||||||
@@ -149,7 +149,7 @@ static int lua_db_active(lua_State *L)
|
|||||||
first parameter and the error message as the second.
|
first parameter and the error message as the second.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_query(lua_State *L)
|
int lua_db_query(lua_State *L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_handle *db = 0;
|
lua_db_handle *db = 0;
|
||||||
@@ -190,7 +190,7 @@ static int lua_db_query(lua_State *L)
|
|||||||
db:escape(string): Escapes a string for safe use in the given database type.
|
db:escape(string): Escapes a string for safe use in the given database type.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_escape(lua_State *L)
|
int lua_db_escape(lua_State *L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_handle *db = 0;
|
lua_db_handle *db = 0;
|
||||||
@@ -227,7 +227,7 @@ static int lua_db_escape(lua_State *L)
|
|||||||
resultset(N): Fetches one or more rows from a result set.
|
resultset(N): Fetches one or more rows from a result set.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_get_row(lua_State *L)
|
int lua_db_get_row(lua_State *L)
|
||||||
{
|
{
|
||||||
int row_no,x;
|
int row_no,x;
|
||||||
const char *entry;
|
const char *entry;
|
||||||
@@ -287,7 +287,7 @@ static int lua_db_get_row(lua_State *L)
|
|||||||
returns nil as the first parameter and the error message as the second.
|
returns nil as the first parameter and the error message as the second.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_select(lua_State *L)
|
int lua_db_select(lua_State *L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_handle *db = 0;
|
lua_db_handle *db = 0;
|
||||||
@@ -361,7 +361,7 @@ static int lua_db_select(lua_State *L)
|
|||||||
statement and returns the number of rows matching the query.
|
statement and returns the number of rows matching the query.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_prepared_select(lua_State *L)
|
int lua_db_prepared_select(lua_State *L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_prepared_statement *st = 0;
|
lua_db_prepared_statement *st = 0;
|
||||||
@@ -452,7 +452,7 @@ static int lua_db_prepared_select(lua_State *L)
|
|||||||
statement and returns the number of rows affected.
|
statement and returns the number of rows affected.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_prepared_query(lua_State *L)
|
int lua_db_prepared_query(lua_State *L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_prepared_statement *st = 0;
|
lua_db_prepared_statement *st = 0;
|
||||||
@@ -522,7 +522,7 @@ static int lua_db_prepared_query(lua_State *L)
|
|||||||
Returns a table with a :query and :select function, same as the db funcs.
|
Returns a table with a :query and :select function, same as the db funcs.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_prepare(lua_State* L)
|
int lua_db_prepare(lua_State* L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_handle *db = 0;
|
lua_db_handle *db = 0;
|
||||||
@@ -595,7 +595,7 @@ static int lua_db_prepare(lua_State* L)
|
|||||||
DBDPrepareSQL.
|
DBDPrepareSQL.
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
static int lua_db_prepared(lua_State* L)
|
int lua_db_prepared(lua_State* L)
|
||||||
{
|
{
|
||||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
lua_db_handle *db = 0;
|
lua_db_handle *db = 0;
|
||||||
|
@@ -51,6 +51,16 @@ typedef struct {
|
|||||||
} lua_db_prepared_statement;
|
} lua_db_prepared_statement;
|
||||||
|
|
||||||
AP_LUA_DECLARE(int) lua_db_acquire(lua_State* L);
|
AP_LUA_DECLARE(int) lua_db_acquire(lua_State* L);
|
||||||
|
int lua_db_escape(lua_State* L);
|
||||||
|
int lua_db_close(lua_State* L);
|
||||||
|
int lua_db_prepare(lua_State* L);
|
||||||
|
int lua_db_prepared(lua_State* L);
|
||||||
|
int lua_db_select(lua_State* L);
|
||||||
|
int lua_db_query(lua_State* L);
|
||||||
|
int lua_db_prepared_select(lua_State* L);
|
||||||
|
int lua_db_prepared_query(lua_State* L);
|
||||||
|
int lua_db_get_row(lua_State* L);
|
||||||
|
int lua_db_gc(lua_State* L);
|
||||||
|
int lua_db_active(lua_State* L);
|
||||||
|
|
||||||
#endif /* !_LUA_DBD_H_ */
|
#endif /* !_LUA_DBD_H_ */
|
||||||
|
Reference in New Issue
Block a user