mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
check loop resource type
This commit is contained in:
parent
2015dd41d6
commit
ed379f738f
14
php_uv.c
14
php_uv.c
@ -37,13 +37,13 @@
|
||||
}
|
||||
|
||||
#define PHP_UV_FETCH_UV_DEFAULT_LOOP(loop, zloop) \
|
||||
{ \
|
||||
if (zloop != NULL) { \
|
||||
ZEND_FETCH_RESOURCE(loop, uv_loop_t*, &zloop, -1, PHP_UV_LOOP_RESOURCE_NAME, uv_loop_handle); \
|
||||
} else { \
|
||||
loop = uv_default_loop(); \
|
||||
} \
|
||||
}
|
||||
if (zloop != NULL) { \
|
||||
if(!ZEND_FETCH_RESOURCE_NO_RETURN(loop, uv_loop_t*, &zloop, -1, PHP_UV_LOOP_RESOURCE_NAME, uv_loop_handle)){\
|
||||
RETURN_FALSE; \
|
||||
}\
|
||||
} else { \
|
||||
loop = uv_default_loop(); \
|
||||
} \
|
||||
|
||||
#define PHP_UV_ZVAL_TO_FD(fd, zstream) \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user