mirror of
https://github.com/danog/ext-pq.git
synced 2024-12-02 09:18:02 +01:00
check for PQconninfo
This commit is contained in:
parent
af939d7efa
commit
3fe349a4ac
@ -31,6 +31,7 @@ if test "$PHP_PQ" != "no"; then
|
|||||||
-L$PQ_DIR/$PHP_LIBDIR
|
-L$PQ_DIR/$PHP_LIBDIR
|
||||||
])
|
])
|
||||||
PHP_CHECK_LIBRARY(pq, PQlibVersion, [AC_DEFINE(HAVE_PQLIBVERSION, 1, Have PQlibVersion)])
|
PHP_CHECK_LIBRARY(pq, PQlibVersion, [AC_DEFINE(HAVE_PQLIBVERSION, 1, Have PQlibVersion)])
|
||||||
|
PHP_CHECK_LIBRARY(pq, PQconninfo, [AC_DEFINE(HAVE_PQCONNINFO, 1, Have PQconninfo)])
|
||||||
|
|
||||||
PQ_SRC="\
|
PQ_SRC="\
|
||||||
src/php_pq_module.c\
|
src/php_pq_module.c\
|
||||||
|
21
package.xml
21
package.xml
@ -33,7 +33,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
|
|||||||
</lead>
|
</lead>
|
||||||
<date>2014-10-15</date>
|
<date>2014-10-15</date>
|
||||||
<version>
|
<version>
|
||||||
<release>0.5.0</release>
|
<release>0.5.1</release>
|
||||||
<api>0.5.0</api>
|
<api>0.5.0</api>
|
||||||
</version>
|
</version>
|
||||||
<stability>
|
<stability>
|
||||||
@ -42,24 +42,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
|
|||||||
</stability>
|
</stability>
|
||||||
<license>BSD, revised</license>
|
<license>BSD, revised</license>
|
||||||
<notes><![CDATA[
|
<notes><![CDATA[
|
||||||
+ Published documentation at http://devel-m6w6.rhcloud.com/mdref/pq
|
+ Fixed build with PostgreSQL <= 9.2
|
||||||
+ Added pq\Connection::$params
|
|
||||||
+ Added pq\Connection::declare(), pq\Connection::declareAsync() and pq\Cursor
|
|
||||||
+ Added pq\Connection::unlisten() and pq\Connection::off()
|
|
||||||
+ Added pq\Connection::$defaultFetchType, pq\Connection::$defaultTransactionIsolation,
|
|
||||||
pq\Connection::$defaultTransactionReadonly and pq\Connection::$defaultTransactionDeferrable
|
|
||||||
+ Added pq\Connection::$defaultAutoConvert and pq\Result::$autoConvert
|
|
||||||
+ Added pq\Result::CONV_BOOL, pq\Result::CONV_INT, pq\Result::CONV_FLOAT, pq\Result::CONV_SCALAR,
|
|
||||||
pq\Result::CONV_ARRAY, pq\Result::CONV_DATETIME, pq\Result::CONV_JSON and pq\Result::CONV_ALL
|
|
||||||
+ Always declare pq\Types OID constants
|
|
||||||
+ Added pq\Result::fetchAllCols()
|
|
||||||
- Reverse arguments of pq\Result::fetchCol()
|
|
||||||
- Attempt to access properties of objects that have not been initialized by its constructor will throw E_RECOVERABLE_ERROR
|
|
||||||
- Renamed pq\ConverterInterface to pq\Converter
|
|
||||||
- Added second argument "$type" to pq\Converter::convertFromString() and pq\Converter::convertToString()
|
|
||||||
* Fixed wakeup of persistent connections to ping the server with an empty query and eventually reset the connection
|
|
||||||
* Fixed possible invalid free and leak
|
|
||||||
* Fixed a possible crash
|
|
||||||
]]></notes>
|
]]></notes>
|
||||||
<contents>
|
<contents>
|
||||||
<dir name="/">
|
<dir name="/">
|
||||||
|
2
php_pq.h
2
php_pq.h
@ -14,7 +14,7 @@
|
|||||||
#ifndef PHP_PQ_H
|
#ifndef PHP_PQ_H
|
||||||
#define PHP_PQ_H
|
#define PHP_PQ_H
|
||||||
|
|
||||||
#define PHP_PQ_VERSION "0.5.0"
|
#define PHP_PQ_VERSION "0.5.1"
|
||||||
|
|
||||||
int pq_module_number;
|
int pq_module_number;
|
||||||
zend_module_entry pq_module_entry;
|
zend_module_entry pq_module_entry;
|
||||||
|
@ -301,6 +301,7 @@ static void php_pqconn_object_read_port(zval *object, void *o, zval *return_valu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_PQCONNINFO
|
||||||
static void php_pqconn_object_read_params(zval *object, void *o, zval *return_value TSRMLS_DC)
|
static void php_pqconn_object_read_params(zval *object, void *o, zval *return_value TSRMLS_DC)
|
||||||
{
|
{
|
||||||
php_pqconn_object_t *obj = o;
|
php_pqconn_object_t *obj = o;
|
||||||
@ -319,6 +320,7 @@ static void php_pqconn_object_read_params(zval *object, void *o, zval *return_va
|
|||||||
PQconninfoFree(params);
|
PQconninfoFree(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void php_pqconn_object_read_options(zval *object, void *o, zval *return_value TSRMLS_DC)
|
static void php_pqconn_object_read_options(zval *object, void *o, zval *return_value TSRMLS_DC)
|
||||||
{
|
{
|
||||||
@ -2044,9 +2046,11 @@ PHP_MINIT_FUNCTION(pqconn)
|
|||||||
ph.read = php_pqconn_object_read_port;
|
ph.read = php_pqconn_object_read_port;
|
||||||
zend_hash_add(&php_pqconn_object_prophandlers, "port", sizeof("port"), (void *) &ph, sizeof(ph), NULL);
|
zend_hash_add(&php_pqconn_object_prophandlers, "port", sizeof("port"), (void *) &ph, sizeof(ph), NULL);
|
||||||
|
|
||||||
|
#if HAVE_PQCONNINFO
|
||||||
zend_declare_property_null(php_pqconn_class_entry, ZEND_STRL("params"), ZEND_ACC_PUBLIC TSRMLS_CC);
|
zend_declare_property_null(php_pqconn_class_entry, ZEND_STRL("params"), ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||||
ph.read = php_pqconn_object_read_params;
|
ph.read = php_pqconn_object_read_params;
|
||||||
zend_hash_add(&php_pqconn_object_prophandlers, "params", sizeof("params"), (void *) &ph, sizeof(ph), NULL);
|
zend_hash_add(&php_pqconn_object_prophandlers, "params", sizeof("params"), (void *) &ph, sizeof(ph), NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
zend_declare_property_null(php_pqconn_class_entry, ZEND_STRL("options"), ZEND_ACC_PUBLIC TSRMLS_CC);
|
zend_declare_property_null(php_pqconn_class_entry, ZEND_STRL("options"), ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||||
ph.read = php_pqconn_object_read_options;
|
ph.read = php_pqconn_object_read_options;
|
||||||
|
Loading…
Reference in New Issue
Block a user