[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/pgsql.c trunk/ext/pgsql/pgsql.c
geissert Sat, 01 May 2010 18:27:42 + Revision: http://svn.php.net/viewvc?view=revision&revision=298840 Log: Fix typos s/connnection/connection Changed paths: U php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c U php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c U php/php-src/trunk/ext/pgsql/pgsql.c Modified: php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c === --- php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c 2010-05-01 18:20:30 UTC (rev 298839) +++ php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c 2010-05-01 18:27:42 UTC (rev 298840) @@ -3855,7 +3855,7 @@ /* }}} */ #endif -/* {{{ proto int pg_connection_status(resource connnection) +/* {{{ proto int pg_connection_status(resource connection) Get connection status */ PHP_FUNCTION(pg_connection_status) { @@ -3876,7 +3876,7 @@ /* }}} */ #if HAVE_PGTRANSACTIONSTATUS -/* {{{ proto int pg_transaction_status(resource connnection) +/* {{{ proto int pg_transaction_status(resource connection) Get transaction status */ PHP_FUNCTION(pg_transaction_status) { Modified: php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c === --- php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c 2010-05-01 18:20:30 UTC (rev 298839) +++ php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c 2010-05-01 18:27:42 UTC (rev 298840) @@ -434,12 +434,12 @@ #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connection_status, 0, 0, 1) - ZEND_ARG_INFO(0, connnection) + ZEND_ARG_INFO(0, connection) ZEND_END_ARG_INFO() #if HAVE_PGTRANSACTIONSTATUS ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_transaction_status, 0, 0, 1) - ZEND_ARG_INFO(0, connnection) + ZEND_ARG_INFO(0, connection) ZEND_END_ARG_INFO() #endif @@ -4278,7 +4278,7 @@ /* }}} */ #endif -/* {{{ proto int pg_connection_status(resource connnection) +/* {{{ proto int pg_connection_status(resource connection) Get connection status */ PHP_FUNCTION(pg_connection_status) { @@ -4299,7 +4299,7 @@ /* }}} */ #if HAVE_PGTRANSACTIONSTATUS -/* {{{ proto int pg_transaction_status(resource connnection) +/* {{{ proto int pg_transaction_status(resource connection) Get transaction status */ PHP_FUNCTION(pg_transaction_status) { Modified: php/php-src/trunk/ext/pgsql/pgsql.c === --- php/php-src/trunk/ext/pgsql/pgsql.c 2010-05-01 18:20:30 UTC (rev 298839) +++ php/php-src/trunk/ext/pgsql/pgsql.c 2010-05-01 18:27:42 UTC (rev 298840) @@ -434,12 +434,12 @@ #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connection_status, 0, 0, 1) - ZEND_ARG_INFO(0, connnection) + ZEND_ARG_INFO(0, connection) ZEND_END_ARG_INFO() #if HAVE_PGTRANSACTIONSTATUS ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_transaction_status, 0, 0, 1) - ZEND_ARG_INFO(0, connnection) + ZEND_ARG_INFO(0, connection) ZEND_END_ARG_INFO() #endif @@ -4270,7 +4270,7 @@ /* }}} */ #endif -/* {{{ proto int pg_connection_status(resource connnection) +/* {{{ proto int pg_connection_status(resource connection) Get connection status */ PHP_FUNCTION(pg_connection_status) { @@ -4291,7 +4291,7 @@ /* }}} */ #if HAVE_PGTRANSACTIONSTATUS -/* {{{ proto int pg_transaction_status(resource connnection) +/* {{{ proto int pg_transaction_status(resource connection) Get transaction status */ PHP_FUNCTION(pg_transaction_status) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/pgsql.c trunk/ext/pgsql/pgsql.c
iliaaFri, 27 Nov 2009 03:02:01 + Revision: http://svn.php.net/viewvc?view=revision&revision=291335 Log: Fixe build Changed paths: U php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c U php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c U php/php-src/trunk/ext/pgsql/pgsql.c Modified: php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c === --- php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c 2009-11-27 02:42:43 UTC (rev 291334) +++ php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c 2009-11-27 03:02:01 UTC (rev 291335) @@ -768,7 +768,7 @@ if (Z_TYPE_P(index_ptr) != le_index_ptr) { RETURN_FALSE; } - link = (uintptr_t) index_ptr->ptr; + link = (ulong) index_ptr->ptr; ptr = zend_list_find(link,&type); /* check if the link is still there */ if (ptr && (type==le_link || type==le_plink)) { Z_LVAL_P(return_value) = link; Modified: php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c === --- php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c 2009-11-27 02:42:43 UTC (rev 291334) +++ php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c 2009-11-27 03:02:01 UTC (rev 291335) @@ -1224,7 +1224,7 @@ if (Z_TYPE_P(index_ptr) != le_index_ptr) { RETURN_FALSE; } - link = (uintptr_t) index_ptr->ptr; + link = (ulong) index_ptr->ptr; ptr = zend_list_find(link,&type); /* check if the link is still there */ if (ptr && (type==le_link || type==le_plink)) { Z_LVAL_P(return_value) = link; Modified: php/php-src/trunk/ext/pgsql/pgsql.c === --- php/php-src/trunk/ext/pgsql/pgsql.c 2009-11-27 02:42:43 UTC (rev 291334) +++ php/php-src/trunk/ext/pgsql/pgsql.c 2009-11-27 03:02:01 UTC (rev 291335) @@ -1214,7 +1214,7 @@ if (Z_TYPE_P(index_ptr) != le_index_ptr) { RETURN_FALSE; } - link = (uintptr_t) index_ptr->ptr; + link = (ulong) index_ptr->ptr; ptr = zend_list_find(link,&type); /* check if the link is still there */ if (ptr && (type==le_link || type==le_plink)) { Z_LVAL_P(return_value) = link; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/pgsql/pgsql.c branches/PHP_5_3/ext/pgsql/pgsql.c trunk/ext/pgsql/pgsql.c
iliaaMon, 02 Nov 2009 13:33:24 + Revision: http://svn.php.net/viewvc?view=revision&revision=290146 Log: Fixed compiler warnings Changed paths: U php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c U php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c U php/php-src/trunk/ext/pgsql/pgsql.c Modified: php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c === --- php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c 2009-11-02 13:02:48 UTC (rev 290145) +++ php/php-src/branches/PHP_5_2/ext/pgsql/pgsql.c 2009-11-02 13:33:24 UTC (rev 290146) @@ -363,7 +363,7 @@ if (PGG(log_notices)) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", notice->message); } - zend_hash_index_update(&PGG(notices), (int)resource_id, (void **)¬ice, sizeof(php_pgsql_notice *), NULL); + zend_hash_index_update(&PGG(notices), (ulong)resource_id, (void **)¬ice, sizeof(php_pgsql_notice *), NULL); } } /* }}} */ @@ -761,13 +761,14 @@ */ if (!(connect_type & PGSQL_CONNECT_FORCE_NEW) && zend_hash_find(&EG(regular_list),str.c,str.len+1,(void **) &index_ptr)==SUCCESS) { - int type,link; + int type; + ulong link; void *ptr; if (Z_TYPE_P(index_ptr) != le_index_ptr) { RETURN_FALSE; } - link = (int) index_ptr->ptr; + link = (uintptr_t) index_ptr->ptr; ptr = zend_list_find(link,&type); /* check if the link is still there */ if (ptr && (type==le_link || type==le_plink)) { Z_LVAL_P(return_value) = link; @@ -1754,14 +1755,15 @@ if (return_oid) { +#if UINT_MAX > LONG_MAX /* Oid is unsigned int, we don't need this code, where LONG is wider */ if (oid > LONG_MAX) { smart_str oidstr = {0}; smart_str_append_unsigned(&oidstr, oid); smart_str_0(&oidstr); RETURN_STRINGL(oidstr.c, oidstr.len, 0); - } else { + } else +#endif RETURN_LONG((long)oid); - } } /* try to lookup the table name in the resource list */ @@ -1859,7 +1861,7 @@ case PHP_PG_FIELD_TYPE_OID: oid = PQftype(pgsql_result, Z_LVAL_PP(field)); - +#if UINT_MAX > LONG_MAX if (oid > LONG_MAX) { smart_str s = {0}; smart_str_append_unsigned(&s, oid); @@ -1867,8 +1869,8 @@ Z_STRVAL_P(return_value) = s.c; Z_STRLEN_P(return_value) = s.len; Z_TYPE_P(return_value) = IS_STRING; - } - else + } else +#endif { Z_LVAL_P(return_value) = (long)oid; Z_TYPE_P(return_value) = IS_LONG; @@ -5767,8 +5769,8 @@ { zval *row; char *field_name, *element, *data; - size_t num_fields, element_len, data_len; - int pg_numrows, pg_row; + size_t num_fields, element_len; + int data_len, pg_numrows, pg_row; uint i; assert(Z_TYPE_P(ret_array) == IS_ARRAY); Modified: php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c === --- php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c 2009-11-02 13:02:48 UTC (rev 290145) +++ php/php-src/branches/PHP_5_3/ext/pgsql/pgsql.c 2009-11-02 13:33:24 UTC (rev 290146) @@ -819,7 +819,7 @@ if (PGG(log_notices)) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", notice->message); } - zend_hash_index_update(&PGG(notices), (int)resource_id, (void **)¬ice, sizeof(php_pgsql_notice *), NULL); + zend_hash_index_update(&PGG(notices), (ulong)resource_id, (void **)¬ice, sizeof(php_pgsql_notice *), NULL); } } /* }}} */ @@ -1217,13 +1217,14 @@ */ if (!(connect_type & PGSQL_CONNECT_FORCE_NEW) && zend_hash_find(&EG(regular_list),str.c,str.len+1,(void **) &index_ptr)==SUCCESS) { - int type,link; + int type; + ulong link; void *ptr; if (Z_TYPE_P(index_ptr) != le_index_ptr) { RETURN_FALSE; } - link = (int) index_ptr->ptr; +