Skip to content

Commit f9672b8

Browse files
committed
ext/pgsql: Use new php_streams fast ZPP specifier
1 parent 4263efc commit f9672b8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ext/pgsql/pgsql.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6265,22 +6265,19 @@ PHP_FUNCTION(pg_put_copy_end)
62656265

62666266
PHP_FUNCTION(pg_socket_poll)
62676267
{
6268-
zval *z_socket;
62696268
php_stream *stream;
62706269
php_socket_t socket;
62716270
zend_long read, write;
62726271
zend_long ts = -1;
62736272

62746273
ZEND_PARSE_PARAMETERS_START(3, 4)
6275-
Z_PARAM_RESOURCE(z_socket)
6274+
PHP_Z_PARAM_STREAM(stream)
62766275
Z_PARAM_LONG(read)
62776276
Z_PARAM_LONG(write)
62786277
Z_PARAM_OPTIONAL
62796278
Z_PARAM_LONG(ts)
62806279
ZEND_PARSE_PARAMETERS_END();
62816280

6282-
php_stream_from_zval(stream, z_socket);
6283-
62846281
if (php_stream_cast(stream, PHP_STREAM_AS_SOCKETD, (void **)&socket, 0)) {
62856282
zend_argument_type_error(1, "invalid resource socket");
62866283
RETURN_THROWS();

0 commit comments

Comments
 (0)