]> granicus.if.org Git - apache/commitdiff
Debian doesn't like pushing statically defined functions into tables, so we'll declar...
authorDaniel Gruno <humbedooh@apache.org>
Sat, 12 Jan 2013 12:58:31 +0000 (12:58 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Sat, 12 Jan 2013 12:58:31 +0000 (12:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1432418 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_dbd.c
modules/lua/lua_dbd.h

index 0bd1d5e88127943252f2da2ba9376098bc4b186a..7c334d68a2d231c17fefe95a07e2dc6097cb736a 100644 (file)
@@ -56,7 +56,7 @@ static lua_db_result_set *lua_get_result_set(lua_State *L)
     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;
@@ -84,14 +84,14 @@ static int lua_db_close(lua_State *L)
     lua_settop(L, 0);
     lua_pushnumber(L, rc);
     return 1;
-}
+} 
 
 /*
    =============================================================================
      db:__gc(): Garbage collecting function.
    =============================================================================
  */
-static int lua_db_gc(lua_State *L)
+int lua_db_gc(lua_State *L)
 {
     /*~~~~~~~~~~~~~~~~*/
     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.
    =============================================================================
  */
-static int lua_db_active(lua_State *L)
+int lua_db_active(lua_State *L)
 {
     /*~~~~~~~~~~~~~~~~~~~~*/
     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.
    =============================================================================
  */
-static int lua_db_query(lua_State *L)
+int lua_db_query(lua_State *L)
 {
     /*~~~~~~~~~~~~~~~~~~~~~~~*/
     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.
    =============================================================================
  */
-static int lua_db_escape(lua_State *L)
+int lua_db_escape(lua_State *L)
 {
     /*~~~~~~~~~~~~~~~~~~~~~*/
     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.
    =============================================================================
  */
-static int lua_db_get_row(lua_State *L) 
+int lua_db_get_row(lua_State *L) 
 {
     int row_no,x;
     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.
    =============================================================================
  */
-static int lua_db_select(lua_State *L)
+int lua_db_select(lua_State *L)
 {
     /*~~~~~~~~~~~~~~~~~~~~~~~*/
     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.
    =============================================================================
  */
-static int lua_db_prepared_select(lua_State *L)
+int lua_db_prepared_select(lua_State *L)
 {
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
     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.
    =============================================================================
  */
-static int lua_db_prepared_query(lua_State *L)
+int lua_db_prepared_query(lua_State *L)
 {
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
     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.
    =============================================================================
  */
-static int lua_db_prepare(lua_State* L) 
+int lua_db_prepare(lua_State* L) 
 {
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
     lua_db_handle   *db = 0;
@@ -595,7 +595,7 @@ static int lua_db_prepare(lua_State* L)
     DBDPrepareSQL.
    =============================================================================
  */
-static int lua_db_prepared(lua_State* L) 
+int lua_db_prepared(lua_State* L) 
 {
     /*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
     lua_db_handle   *db = 0;
index 5cd2a7dd2bc7d2551b394b16d29a9948663067ef..6f74efd0bd0e5977ec4a7b469718081109c481b2 100644 (file)
@@ -51,6 +51,16 @@ typedef struct {
 } lua_db_prepared_statement;
 
 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_ */