check loop resource type

This commit is contained in:
Shuhei Tanuma 2012-07-19 23:09:34 +09:00
parent 2015dd41d6
commit ed379f738f

View File

@ -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) \
{ \