mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/pgsql: Use new php_streams fast ZPP specifier
This commit is contained in:
parent
c9d23c96d6
commit
eb4ccf5758
1 changed files with 1 additions and 4 deletions
|
@ -6265,22 +6265,19 @@ PHP_FUNCTION(pg_put_copy_end)
|
||||||
|
|
||||||
PHP_FUNCTION(pg_socket_poll)
|
PHP_FUNCTION(pg_socket_poll)
|
||||||
{
|
{
|
||||||
zval *z_socket;
|
|
||||||
php_stream *stream;
|
php_stream *stream;
|
||||||
php_socket_t socket;
|
php_socket_t socket;
|
||||||
zend_long read, write;
|
zend_long read, write;
|
||||||
zend_long ts = -1;
|
zend_long ts = -1;
|
||||||
|
|
||||||
ZEND_PARSE_PARAMETERS_START(3, 4)
|
ZEND_PARSE_PARAMETERS_START(3, 4)
|
||||||
Z_PARAM_RESOURCE(z_socket)
|
PHP_Z_PARAM_STREAM(stream)
|
||||||
Z_PARAM_LONG(read)
|
Z_PARAM_LONG(read)
|
||||||
Z_PARAM_LONG(write)
|
Z_PARAM_LONG(write)
|
||||||
Z_PARAM_OPTIONAL
|
Z_PARAM_OPTIONAL
|
||||||
Z_PARAM_LONG(ts)
|
Z_PARAM_LONG(ts)
|
||||||
ZEND_PARSE_PARAMETERS_END();
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
php_stream_from_zval(stream, z_socket);
|
|
||||||
|
|
||||||
if (php_stream_cast(stream, PHP_STREAM_AS_SOCKETD, (void **)&socket, 0)) {
|
if (php_stream_cast(stream, PHP_STREAM_AS_SOCKETD, (void **)&socket, 0)) {
|
||||||
zend_argument_type_error(1, "invalid resource socket");
|
zend_argument_type_error(1, "invalid resource socket");
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue