Skip to content

Commit d7bdf90

Browse files
authored
ext/phar: Remove phar_resolve_alias() (#15860)
As this is unused and a SourceGraph search returns 0 result
1 parent e504df8 commit d7bdf90

File tree

4 files changed

+0
-25
lines changed

4 files changed

+0
-25
lines changed

ext/phar/config.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ if test "$PHP_PHAR" != "no"; then
3232
PHP_ADD_EXTENSION_DEP(phar, spl)
3333
PHP_ADD_MAKEFILE_FRAGMENT
3434

35-
PHP_INSTALL_HEADERS([ext/phar], [php_phar.h])
36-
3735
AC_CONFIG_FILES([
3836
$ext_dir/phar.1
3937
$ext_dir/phar.phar.1

ext/phar/config.w32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ if (PHP_PHAR != "no") {
3636
}
3737
ADD_EXTENSION_DEP('phar', 'hash');
3838
ADD_EXTENSION_DEP('phar', 'spl');
39-
PHP_INSTALL_HEADERS("ext/phar", "php_phar.h");
4039

4140
ADD_MAKEFILE_FRAGMENT();
4241
}

ext/phar/php_phar.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,7 @@
2222

2323
#define PHP_PHAR_VERSION PHP_VERSION
2424

25-
#include "ext/standard/basic_functions.h"
2625
extern zend_module_entry phar_module_entry;
2726
#define phpext_phar_ptr &phar_module_entry
2827

29-
#ifdef PHP_WIN32
30-
#define PHP_PHAR_API __declspec(dllexport)
31-
#else
32-
#define PHP_PHAR_API PHPAPI
33-
#endif
34-
35-
PHP_PHAR_API zend_result phar_resolve_alias(char *alias, size_t alias_len, char **filename, size_t *filename_len);
36-
3728
#endif /* PHP_PHAR_H */

ext/phar/util.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
*/
2020

2121
#include "phar_internal.h"
22-
#include "php_phar.h"
2322
#include "ext/hash/php_hash.h" /* Needed for PHP_HASH_API in ext/hash/php_hash_sha.h */
2423
#include "ext/hash/php_hash_sha.h"
2524
#include "ext/standard/md5.h"
@@ -975,18 +974,6 @@ phar_entry_info * phar_open_jit(phar_archive_data *phar, phar_entry_info *entry,
975974
}
976975
/* }}} */
977976

978-
PHP_PHAR_API zend_result phar_resolve_alias(char *alias, size_t alias_len, char **filename, size_t *filename_len) /* {{{ */ {
979-
phar_archive_data *fd_ptr;
980-
if (HT_IS_INITIALIZED(&PHAR_G(phar_alias_map))
981-
&& NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len))) {
982-
*filename = fd_ptr->fname;
983-
*filename_len = fd_ptr->fname_len;
984-
return SUCCESS;
985-
}
986-
return FAILURE;
987-
}
988-
/* }}} */
989-
990977
zend_result phar_free_alias(phar_archive_data *phar, char *alias, size_t alias_len) /* {{{ */
991978
{
992979
if (phar->refcount || phar->is_persistent) {

0 commit comments

Comments
 (0)