cvs: php4 /ext/fbsql php_fbsql.c

From: Date: Tue, 01 May 2001 22:04:11 +0000
Subject: cvs: php4 /ext/fbsql php_fbsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5445@lists.php.net to get a copy of this message
fmk Tue May 1 15:04:11 2001 EDT Modified files: /php4/ext/fbsql php_fbsql.c Log: Fixing some proto types and return values Index: php4/ext/fbsql/php_fbsql.c diff -u php4/ext/fbsql/php_fbsql.c:1.14 php4/ext/fbsql/php_fbsql.c:1.15 --- php4/ext/fbsql/php_fbsql.c:1.14 Wed Apr 25 12:45:13 2001 +++ php4/ext/fbsql/php_fbsql.c Tue May 1 15:04:11 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fbsql.c,v 1.14 2001/04/25 19:45:13 fmk Exp $ */ +/* $Id: php_fbsql.c,v 1.15 2001/05/01 22:04:11 fmk Exp $ */ /* TODO: * @@ -607,7 +607,7 @@ return_value->type = IS_LONG; } -/* {{{ proto int fbsql_connect([string hostname [, string username [, string [password]]]); +/* {{{ proto int fbsql_connect([string hostname [, string username [, string password]]]); */ PHP_FUNCTION(fbsql_connect) { @@ -616,7 +616,7 @@ /* }}} */ -/* {{{ proto int fbsql_pconnect([string hostname [, string username [, string [password]]]); +/* {{{ proto int fbsql_pconnect([string hostname [, string username [, string password]]]); */ PHP_FUNCTION(fbsql_pconnect) { @@ -860,16 +860,14 @@ { convert_to_boolean_ex(argv[1]); OnOff = Z_BVAL_PP(argv[1]); + phpLink->autoCommit = OnOff; if (OnOff) md = fbcdcExecuteDirectSQL(phpLink->currentDatabase->connection, "SET COMMIT TRUE;"); else md = fbcdcExecuteDirectSQL(phpLink->currentDatabase->connection, "SET COMMIT FALSE;"); fbcmdRelease(md); - RETURN_TRUE; - } - else { - RETURN_BOOL(phpLink->autoCommit); } + RETURN_BOOL(phpLink->autoCommit); } /* }}} */ @@ -1184,7 +1182,7 @@ /* }}} */ -/* {{{ proto int fbsql_create_db([string database_name [, int link_identifier]]) +/* {{{ proto int fbsql_create_db(string database_name [, int link_identifier]) */ PHP_FUNCTION(fbsql_create_db) { @@ -1982,7 +1980,7 @@ /* }}} */ -/* {{{ proto int fbsql_generate_warnings([int flag]); +/* {{{ proto bool fbsql_generate_warnings([int flag]); */ PHP_FUNCTION(fbsql_warnings) { @@ -1992,13 +1990,12 @@ if ((argc < 0) || (argc > 1)) WRONG_PARAM_COUNT; if (zend_get_parameters_ex(argc,&argv[0])==FAILURE) RETURN_FALSE; - return_value->value.lval = FB_SQL_G(generateWarnings); - return_value->type = IS_LONG; if (argc >= 1) { convert_to_long_ex(argv[0]); FB_SQL_G(generateWarnings) = (*argv[0])->value.lval != 0; } + RETURN_BOOL(FB_SQL_G(generateWarnings)); } /* }}} */ @@ -2697,7 +2694,7 @@ /* }}} */ -/* {{{ proto array fbsql_fetch_lengths(int result) +/* {{{ proto array fbsql_fetch_lengths([int result]) */ PHP_FUNCTION(fbsql_fetch_lengths) {

« previous php.cvs (#5445) next »