Skip to content

Commit 84854a7

Browse files
committed
Remove mergesort implementation
php_mergesort() isn't being used for anything, and hasn't been for a long time. Even if we wanted to use a stable sort, this isn't the implementation we'd use...
1 parent 0427ef9 commit 84854a7

File tree

4 files changed

+2
-350
lines changed

4 files changed

+2
-350
lines changed

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ PHP_ADD_SOURCES(TSRM, TSRM.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
14391439
PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c \
14401440
fopen_wrappers.c alloca.c php_scandir.c \
14411441
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
1442-
strlcat.c explicit_bzero.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
1442+
strlcat.c explicit_bzero.c reentrancy.c php_variables.c php_ticks.c \
14431443
network.c php_open_temporary_file.c \
14441444
output.c getopt.c php_syslog.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
14451445

main/mergesort.c

-347
This file was deleted.

main/php.h

-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ END_EXTERN_C()
360360
BEGIN_EXTERN_C()
361361
PHPAPI extern int (*php_register_internal_extensions_func)(void);
362362
PHPAPI int php_register_internal_extensions(void);
363-
PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *));
364363
PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata);
365364
PHPAPI void php_com_initialize(void);
366365
PHPAPI char *php_get_current_user(void);

win32/build/config.w32

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ if (VS_TOOLSET && VCVERS >= 1914) {
248248

249249
ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \
250250
php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
251-
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c network.c \
251+
strlcat.c reentrancy.c php_variables.c php_ticks.c network.c \
252252
php_open_temporary_file.c output.c internal_functions.c \
253253
php_syslog.c");
254254
ADD_FLAG("CFLAGS_BD_MAIN", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");

0 commit comments

Comments
 (0)