diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 78dae4eb5cd..b1272622ad5 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -202,7 +202,7 @@ static zend_object *spl_filesystem_object_new(zend_class_entry *class_type) } /* }}} */ -PHPAPI zend_string *spl_filesystem_object_get_path(spl_filesystem_object *intern) /* {{{ */ +PHPAPI zend_string *spl_filesystem_object_get_path(const spl_filesystem_object *intern) /* {{{ */ { #ifdef HAVE_GLOB if (intern->type == SPL_FS_DIR && php_stream_is(intern->u.dir.dirp, &php_glob_stream_ops)) { diff --git a/ext/spl/spl_directory.h b/ext/spl/spl_directory.h index d036013161c..e7863e24dae 100644 --- a/ext/spl/spl_directory.h +++ b/ext/spl/spl_directory.h @@ -36,7 +36,7 @@ typedef struct _spl_filesystem_object spl_filesystem_object; typedef void (*spl_foreign_dtor_t)(spl_filesystem_object *object); typedef void (*spl_foreign_clone_t)(spl_filesystem_object *src, spl_filesystem_object *dst); -PHPAPI zend_string *spl_filesystem_object_get_path(spl_filesystem_object *intern); +PHPAPI zend_string *spl_filesystem_object_get_path(const spl_filesystem_object *intern); typedef struct _spl_other_handler { spl_foreign_dtor_t dtor;