@@ -64,14 +64,15 @@ PHPAPI PHP_FUNCTION(dl)
6464 zend_rc_debug = false;
6565#endif
6666
67- php_dl (filename , MODULE_TEMPORARY , return_value , 0 );
68- if (Z_TYPE_P ( return_value ) == IS_TRUE ) {
69- EG (full_tables_cleanup ) = 1 ;
67+ zend_result loaded = php_load_extension (filename , MODULE_TEMPORARY , false );
68+ if (loaded == SUCCESS ) {
69+ EG (full_tables_cleanup ) = true ;
7070 }
7171
7272#if ZEND_RC_DEBUG
7373 zend_rc_debug = orig_rc_debug ;
7474#endif
75+ RETURN_BOOL (loaded == SUCCESS );
7576}
7677/* }}} */
7778
@@ -105,7 +106,7 @@ PHPAPI void *php_load_shlib(const char *path, char **errp)
105106/* }}} */
106107
107108/* {{{ php_load_extension */
108- PHPAPI int php_load_extension (const char * filename , int type , int start_now )
109+ PHPAPI zend_result php_load_extension (const char * filename , int type , bool start_now )
109110{
110111 void * handle ;
111112 char * libpath ;
@@ -266,7 +267,7 @@ PHPAPI void *php_load_shlib(const char *path, char **errp)
266267 return NULL ;
267268}
268269
269- PHPAPI int php_load_extension (const char * filename , int type , int start_now )
270+ PHPAPI zend_result php_load_extension (const char * filename , int type , bool start_now )
270271{
271272 php_dl_error (filename );
272273
@@ -275,18 +276,6 @@ PHPAPI int php_load_extension(const char *filename, int type, int start_now)
275276
276277#endif
277278
278- /* {{{ php_dl */
279- PHPAPI void php_dl (const char * file , int type , zval * return_value , int start_now )
280- {
281- /* Load extension */
282- if (php_load_extension (file , type , start_now ) == FAILURE ) {
283- RETVAL_FALSE ;
284- } else {
285- RETVAL_TRUE ;
286- }
287- }
288- /* }}} */
289-
290279PHP_MINFO_FUNCTION (dl )
291280{
292281#if defined(HAVE_LIBDL )
0 commit comments