cvs: pear /PECL/session_pgsql session_pgsql.c
| From: | Yasuo Ohgaki | Date: | Sat, 12 Jan 2002 01:19:15 +0000 |
| Subject: | cvs: pear /PECL/session_pgsql session_pgsql.c | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1911@lists.php.net to get a copy of this message | ||
yohgaki Fri Jan 11 20:19:15 2002 EDT
Modified files:
/pear/PECL/session_pgsql session_pgsql.c
Log:
Added folding hooks
Index: pear/PECL/session_pgsql/session_pgsql.c
diff -u pear/PECL/session_pgsql/session_pgsql.c:1.9 pear/PECL/session_pgsql/session_pgsql.c:1.10
--- pear/PECL/session_pgsql/session_pgsql.c:1.9 Fri Jan 11 20:06:12 2002
+++ pear/PECL/session_pgsql/session_pgsql.c Fri Jan 11 20:19:15 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session_pgsql.c,v 1.9 2002/01/12 01:06:12 yohgaki Exp $ */
+/* $Id: session_pgsql.c,v 1.10 2002/01/12 01:19:15 yohgaki Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -51,27 +51,30 @@
#endif
PHP_MINIT_FUNCTION(ps_pgsql);
-PHP_RINIT_FUNCTION(ps_pgsql);
PHP_MSHUTDOWN_FUNCTION(ps_pgsql);
PHP_RSHUTDOWN_FUNCTION(ps_pgsql);
PHP_MINFO_FUNCTION(ps_pgsql);
-
+/* {{{ ps_pgsql_module_entry
+ */
zend_module_entry ps_pgsql_module_entry = {
STANDARD_MODULE_HEADER,
"session pgsql",
NULL,
PHP_MINIT(ps_pgsql), PHP_MSHUTDOWN(ps_pgsql),
- PHP_RINIT(ps_pgsql), PHP_RSHUTDOWN(ps_pgsql),
+ NULL, PHP_RSHUTDOWN(ps_pgsql),
PHP_MINFO(ps_pgsql),
"0.1",
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_SESSION_PGSQL
ZEND_GET_MODULE(ps_pgsql)
#endif
+/* {{{ php_pg_pgsql_connect
+ */
static int php_ps_pgsql_connect(const char *conn_str)
{
ELOG("php_ps_pgsql_connect() is called");
@@ -93,7 +96,10 @@
}
return SUCCESS;
}
+/* }}} */
+/* {{{ php_pg_pgsql_gc
+ */
static int php_ps_pgsql_gc(void)
{
PGresult *pg_result;
@@ -121,8 +127,10 @@
return ret;
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(ps_pgsql)
{
#ifdef ZTS
@@ -136,7 +144,10 @@
php_session_register_module(&ps_mod_pgsql);
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOEN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(ps_pgsql)
{
/* link is closed at shutdown */
@@ -145,16 +156,10 @@
PS_PGSQL(pgsql_link) = NULL;
return SUCCESS;
}
+/* }}} */
-PHP_RINIT_FUNCTION(ps_pgsql)
-{
- ELOG("RINIT Called");
-/* if (PS(save_path) && PS(save_path)[0] == 'p' ) { */
-/* return php_ps_pgsql_connect(PS(save_path)); */
-/* } */
- return SUCCESS;
-}
-
+/* {{{ PHP_RSHUTDOEN_FUNCTION
+ */
PHP_RSHUTDOWN_FUNCTION(ps_pgsql)
{
int ret = SUCCESS;
@@ -166,14 +171,20 @@
}
return ret;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(ps_pgsql)
{
php_info_print_table_start();
php_info_print_table_header(2, "pgsql session support", "enabled");
php_info_print_table_end();
}
+/* }}} */
+/* {{{ ps_pgsql_valid_str
+ */
static int ps_pgsql_valid_str(const char *key)
{
size_t len;
@@ -196,8 +207,10 @@
ret = 0;
return ret;
}
+/* }}} */
-
+/* {{{ PS_OPEN_FUNC
+ */
PS_OPEN_FUNC(pgsql)
{
int ret = SUCCESS;
@@ -221,7 +234,10 @@
PQclear(pg_result);
return ret;
}
+/* }}} */
+/* {{{ PS_CLOSE_FUNC
+ */
PS_CLOSE_FUNC(pgsql)
{
PGresult *pg_result;
@@ -242,7 +258,10 @@
PQclear(pg_result);
return ret;
}
+/* }}} */
+/* {{{ PS_READ_FUNC
+ */
PS_READ_FUNC(pgsql)
{
PGresult *pg_result;
@@ -302,7 +321,10 @@
/* return ret; */
return SUCCESS;
}
+/* }}} */
+/* {{{ PS_WRITE_FUNC
+ */
PS_WRITE_FUNC(pgsql)
{
PGresult *pg_result = NULL;
@@ -359,7 +381,10 @@
/* return ret; */
return SUCCESS;
}
+/* }}} */
+/* {{{ PS_DESTROY_FUNC
+ */
PS_DESTROY_FUNC(pgsql)
{
PGresult *pg_result;
@@ -388,7 +413,10 @@
return ret;
}
+/* }}} */
+/* {{{ PS_GC_FUNC
+ */
PS_GC_FUNC(pgsql)
{
PS_PGSQL(maxlifetime) = maxlifetime;