cvs: php4 /ext/fbsql php_fbsql.c php_fbsql.h

From: Date: Mon, 29 Oct 2001 21:27:32 +0000
Subject: cvs: php4 /ext/fbsql php_fbsql.c php_fbsql.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8026@lists.php.net to get a copy of this message
fmk Mon Oct 29 16:27:32 2001 EDT Modified files: /php4/ext/fbsql php_fbsql.h php_fbsql.c Log: Fixing spelling of persistent Index: php4/ext/fbsql/php_fbsql.h diff -u php4/ext/fbsql/php_fbsql.h:1.15 php4/ext/fbsql/php_fbsql.h:1.16 --- php4/ext/fbsql/php_fbsql.h:1.15 Tue Oct 16 19:08:38 2001 +++ php4/ext/fbsql/php_fbsql.h Mon Oct 29 16:27:31 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fbsql.h,v 1.15 2001/10/16 23:08:38 fmk Exp $ */ +/* $Id: php_fbsql.h,v 1.16 2001/10/29 21:27:31 fmk Exp $ */ #define HAVE_FBSQL 1 @@ -98,13 +98,13 @@ //PHP_FUNCTION(fbsql_set_autostart_info); static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type); -static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistant); +static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent); ZEND_BEGIN_MODULE_GLOBALS(fbsql) long allowPersistent; long generateWarnings; long autoCommit; - long maxPersistant; + long maxPersistent; long maxLinks; long maxConnections; long maxResults; @@ -114,7 +114,7 @@ char *databasePassword; char *userName; char *userPassword; - long persistantCount; + long persistentCount; long linkCount; long linkIndex; Index: php4/ext/fbsql/php_fbsql.c diff -u php4/ext/fbsql/php_fbsql.c:1.62 php4/ext/fbsql/php_fbsql.c:1.63 --- php4/ext/fbsql/php_fbsql.c:1.62 Mon Oct 29 13:53:52 2001 +++ php4/ext/fbsql/php_fbsql.c Mon Oct 29 16:27:31 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fbsql.c,v 1.62 2001/10/29 18:53:52 fmk Exp $ */ +/* $Id: php_fbsql.c,v 1.63 2001/10/29 21:27:31 fmk Exp $ */ /* TODO: * @@ -72,12 +72,12 @@ typedef struct PHPFBLink PHPFBLink; /* The PHPFBLink structure represents a fbsql link. The lion is used for - a connection to a machine, it may be persistant and is reference counted. + a connection to a machine, it may be persistent and is reference counted. The reason for refcounting is mostly to avoid to think, it work independent of any wierd and unforseen allocation deallocation order. The PHPFBDatabse structure implements to actual connection to a FrontBase server - ot may be persistant is the link it is connected to is persistant, and refcounted + ot may be persistent is the link it is connected to is persistent, and refcounted for the same reasons as above. The PHPFBResult structure implements a result from the FrontBase server, and does all @@ -92,7 +92,7 @@ user name. So connecting twice to the same database as the same user will return the same database id. We use the same coding for that as fbsql does, explioiting the underlying implementation of the lists. - Persistant objects are put in the persistent list as well, but only by name, if you connect to a persistant object + Persistent objects are put in the persistent list as well, but only by name, if you connect to a persistent object and it is not in the list it is simply added and get a new index, and refcounted. Tricky, tricky ... */ @@ -134,7 +134,7 @@ struct PHPFBLink { - int persistant; /* persistant ? */ + int persistent; /* persistent ? */ char* hostName; /* Host name */ char* userName; /* User name */ char* userPassword; /* User password */ @@ -327,7 +327,7 @@ if (link->execHandler) fbcehRelease(link->execHandler); free(link); FB_SQL_G(linkCount)--; - FB_SQL_G(persistantCount)--; + FB_SQL_G(persistentCount)--; } } @@ -355,10 +355,10 @@ /* {{{ PHP_INI */ PHP_INI_BEGIN() - STD_PHP_INI_BOOLEAN ("fbsql.allow_persistant", "1", PHP_INI_SYSTEM, OnUpdateInt, allowPersistent, zend_fbsql_globals, fbsql_globals) + STD_PHP_INI_BOOLEAN ("fbsql.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateInt, allowPersistent, zend_fbsql_globals, fbsql_globals) STD_PHP_INI_BOOLEAN ("fbsql.generate_warnings", "0", PHP_INI_SYSTEM, OnUpdateInt, generateWarnings, zend_fbsql_globals, fbsql_globals) STD_PHP_INI_BOOLEAN ("fbsql.autocommit", "1", PHP_INI_SYSTEM, OnUpdateInt, autoCommit, zend_fbsql_globals, fbsql_globals) - STD_PHP_INI_ENTRY_EX ("fbsql.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateInt, maxPersistant, zend_fbsql_globals, fbsql_globals, display_link_numbers) + STD_PHP_INI_ENTRY_EX ("fbsql.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateInt, maxPersistent, zend_fbsql_globals, fbsql_globals, display_link_numbers) STD_PHP_INI_ENTRY_EX ("fbsql.max_links", "128", PHP_INI_SYSTEM, OnUpdateInt, maxLinks, zend_fbsql_globals, fbsql_globals, display_link_numbers) STD_PHP_INI_ENTRY_EX ("fbsql.max_connections", "128", PHP_INI_SYSTEM, OnUpdateInt, maxConnections, zend_fbsql_globals, fbsql_globals, display_link_numbers) STD_PHP_INI_ENTRY_EX ("fbsql.max_results", "128", PHP_INI_SYSTEM, OnUpdateInt, maxResults, zend_fbsql_globals, fbsql_globals, display_link_numbers) @@ -373,7 +373,7 @@ static void php_fbsql_init_globals(zend_fbsql_globals *fbsql_globals) { - fbsql_globals->persistantCount = 0; + fbsql_globals->persistentCount = 0; if (fbsql_globals->hostName==NULL) { @@ -383,7 +383,7 @@ fbsql_globals->hostName = strdup(name); } - fbsql_globals->persistantCount = 0; + fbsql_globals->persistentCount = 0; fbsql_globals->linkCount = 0; } @@ -438,7 +438,7 @@ PHP_RINIT_FUNCTION(fbsql) { FB_SQL_G(linkIndex) = -1; - FB_SQL_G(linkCount) = FB_SQL_G(persistantCount); + FB_SQL_G(linkCount) = FB_SQL_G(persistentCount); return SUCCESS; } @@ -458,8 +458,8 @@ if (FB_SQL_G(allowPersistent)) { - sprintf(buf, "%ld", FB_SQL_G(persistantCount)); - php_info_print_table_row(2, "Active Persistant Links", buf); + sprintf(buf, "%ld", FB_SQL_G(persistentCount)); + php_info_print_table_row(2, "Active Persistent Links", buf); } sprintf(buf, "%ld", FB_SQL_G(linkCount)); @@ -475,7 +475,7 @@ DISPLAY_INI_ENTRIES(); } -static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistant) +static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { PHPFBLink* phpLink; list_entry *lep; @@ -509,9 +509,9 @@ sprintf(name, "fbsql_%s_%s_%s", hostName, userName, userPassword); if (!FB_SQL_G(allowPersistent)) { - persistant=0; + persistent=0; } - if (persistant) { + if (persistent) { if (zend_hash_find(&EG(persistent_list), name, strlen(name) + 1, (void **)&lep) == SUCCESS) { phpLink = (PHPFBLink*)lep->ptr; @@ -526,15 +526,15 @@ RETURN_FALSE; } - if ((FB_SQL_G(maxPersistant) != -1 && FB_SQL_G(persistantCount) == FB_SQL_G(maxPersistant))) + if ((FB_SQL_G(maxPersistent) != -1 && FB_SQL_G(persistentCount) == FB_SQL_G(maxPersistent))) { if (FB_SQL_G(generateWarnings)) - php_error(E_WARNING, "FrontBase persistant link limit %d exceeded ", FB_SQL_G(maxPersistant)); + php_error(E_WARNING, "FrontBase persistent link limit %d exceeded ", FB_SQL_G(maxPersistent)); RETURN_FALSE; } phpLink = malloc(sizeof(PHPFBLink)); - phpLink->persistant = persistant; + phpLink->persistent = persistent; phpLink->hostName = strdup(hostName); phpLink->userName = strdup(userName); phpLink->userPassword = strdup(userPassword); @@ -560,7 +560,7 @@ RETURN_FALSE; } FB_SQL_G(linkCount)++; - FB_SQL_G(persistantCount)++; + FB_SQL_G(persistentCount)++; } ZEND_REGISTER_RESOURCE(return_value, phpLink, le_plink); } @@ -595,7 +595,7 @@ } phpLink = emalloc(sizeof(PHPFBLink)); - phpLink->persistant = persistant; + phpLink->persistent = persistent; phpLink->hostName = strdup(hostName); phpLink->userName = strdup(userName); phpLink->userPassword = strdup(userPassword);

« previous php.cvs (#8026) next »