Skip to content

Remove unintended ZEND_EXT_API usage #15602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions ext/opcache/jit/zend_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ static bool zend_may_be_dynamic_property(zend_class_entry *ce, zend_string *memb
# endif
#endif

ZEND_EXT_API void zend_jit_status(zval *ret)
void zend_jit_status(zval *ret)
{
zval stats;
array_init(&stats);
Expand Down Expand Up @@ -3046,7 +3046,7 @@ static int zend_jit_setup_hot_counters(zend_op_array *op_array)

#include "jit/zend_jit_trace.c"

ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script)
int zend_jit_op_array(zend_op_array *op_array, zend_script *script)
{
if (dasm_ptr == NULL) {
return FAILURE;
Expand Down Expand Up @@ -3123,7 +3123,7 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script)
return FAILURE;
}

ZEND_EXT_API int zend_jit_script(zend_script *script)
int zend_jit_script(zend_script *script)
{
void *checkpoint;
zend_call_graph call_graph;
Expand Down Expand Up @@ -3235,7 +3235,7 @@ ZEND_EXT_API int zend_jit_script(zend_script *script)
return FAILURE;
}

ZEND_EXT_API void zend_jit_unprotect(void)
void zend_jit_unprotect(void)
{
#ifdef HAVE_MPROTECT
if (!(JIT_G(debug) & (ZEND_JIT_DEBUG_GDB|ZEND_JIT_DEBUG_PERF_DUMP))) {
Expand Down Expand Up @@ -3270,7 +3270,7 @@ ZEND_EXT_API void zend_jit_unprotect(void)
#endif
}

ZEND_EXT_API void zend_jit_protect(void)
void zend_jit_protect(void)
{
#ifdef HAVE_MPROTECT
if (!(JIT_G(debug) & (ZEND_JIT_DEBUG_GDB|ZEND_JIT_DEBUG_PERF_DUMP))) {
Expand Down Expand Up @@ -3362,7 +3362,7 @@ static int zend_jit_parse_config_num(zend_long jit)
return SUCCESS;
}

ZEND_EXT_API int zend_jit_config(zend_string *jit, int stage)
int zend_jit_config(zend_string *jit, int stage)
{
if (stage != ZEND_INI_STAGE_STARTUP && !JIT_G(enabled)) {
if (stage == ZEND_INI_STAGE_RUNTIME) {
Expand Down Expand Up @@ -3418,7 +3418,7 @@ ZEND_EXT_API int zend_jit_config(zend_string *jit, int stage)
return FAILURE;
}

ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int stage)
int zend_jit_debug_config(zend_long old_val, zend_long new_val, int stage)
{
if (stage != ZEND_INI_STAGE_STARTUP) {
if (((old_val ^ new_val) & ZEND_JIT_DEBUG_PERSISTENT) != 0) {
Expand All @@ -3431,7 +3431,7 @@ ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int
return SUCCESS;
}

ZEND_EXT_API void zend_jit_init(void)
void zend_jit_init(void)
{
#ifdef ZTS
jit_globals_id = ts_allocate_id(&jit_globals_id, sizeof(zend_jit_globals), (ts_allocate_ctor) zend_jit_globals_ctor, (ts_allocate_dtor) zend_jit_globals_dtor);
Expand All @@ -3440,7 +3440,7 @@ ZEND_EXT_API void zend_jit_init(void)
#endif
}

ZEND_EXT_API int zend_jit_check_support(void)
int zend_jit_check_support(void)
{
int i;

Expand Down Expand Up @@ -3499,7 +3499,7 @@ ZEND_EXT_API int zend_jit_check_support(void)
return SUCCESS;
}

ZEND_EXT_API void zend_jit_startup(void *buf, size_t size, bool reattached)
void zend_jit_startup(void *buf, size_t size, bool reattached)
{
zend_jit_halt_op = zend_get_halt_op();
zend_jit_profile_counter_rid = zend_get_op_array_extension_handle(ACCELERATOR_PRODUCT_NAME);
Expand Down Expand Up @@ -3582,7 +3582,7 @@ ZEND_EXT_API void zend_jit_startup(void *buf, size_t size, bool reattached)
zend_jit_protect();
}

ZEND_EXT_API void zend_jit_shutdown(void)
void zend_jit_shutdown(void)
{
if (JIT_G(debug) & ZEND_JIT_DEBUG_SIZE && dasm_ptr != NULL) {
fprintf(stderr, "\nJIT memory usage: %td\n", (ptrdiff_t)((char*)*dasm_ptr - (char*)dasm_buf));
Expand All @@ -3606,7 +3606,7 @@ static void zend_jit_reset_counters(void)
}
}

ZEND_EXT_API void zend_jit_activate(void)
void zend_jit_activate(void)
{
zend_jit_profile_counter = 0;
if (JIT_G(on)) {
Expand All @@ -3619,7 +3619,7 @@ ZEND_EXT_API void zend_jit_activate(void)
}
}

ZEND_EXT_API void zend_jit_deactivate(void)
void zend_jit_deactivate(void)
{
if (zend_jit_profile_counter && !CG(unclean_shutdown)) {
zend_class_entry *ce;
Expand Down Expand Up @@ -3702,7 +3702,7 @@ static void zend_jit_restart_preloaded_script(zend_persistent_script *script)
} ZEND_HASH_FOREACH_END();
}

ZEND_EXT_API void zend_jit_restart(void)
void zend_jit_restart(void)
{
if (dasm_buf) {
zend_jit_unprotect();
Expand Down
28 changes: 14 additions & 14 deletions ext/opcache/jit/zend_jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,20 @@ extern int jit_globals_id;
extern zend_jit_globals jit_globals;
#endif

ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script);
ZEND_EXT_API int zend_jit_script(zend_script *script);
ZEND_EXT_API void zend_jit_unprotect(void);
ZEND_EXT_API void zend_jit_protect(void);
ZEND_EXT_API void zend_jit_init(void);
ZEND_EXT_API int zend_jit_config(zend_string *jit_options, int stage);
ZEND_EXT_API int zend_jit_debug_config(zend_long old_val, zend_long new_val, int stage);
ZEND_EXT_API int zend_jit_check_support(void);
ZEND_EXT_API void zend_jit_startup(void *jit_buffer, size_t size, bool reattached);
ZEND_EXT_API void zend_jit_shutdown(void);
ZEND_EXT_API void zend_jit_activate(void);
ZEND_EXT_API void zend_jit_deactivate(void);
ZEND_EXT_API void zend_jit_status(zval *ret);
ZEND_EXT_API void zend_jit_restart(void);
int zend_jit_op_array(zend_op_array *op_array, zend_script *script);
int zend_jit_script(zend_script *script);
void zend_jit_unprotect(void);
void zend_jit_protect(void);
void zend_jit_init(void);
int zend_jit_config(zend_string *jit_options, int stage);
int zend_jit_debug_config(zend_long old_val, zend_long new_val, int stage);
int zend_jit_check_support(void);
void zend_jit_startup(void *jit_buffer, size_t size, bool reattached);
void zend_jit_shutdown(void);
void zend_jit_activate(void);
void zend_jit_deactivate(void);
void zend_jit_status(zval *ret);
void zend_jit_restart(void);

#define ZREG_LOAD (1<<0)
#define ZREG_STORE (1<<1)
Expand Down
Loading