mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
perf: reduce allocs when creating $_SERVER (#540)
* perf: reduce allocs when creating $_SERVER * improve * refactor: prevent C allocs when populating $_SERVER * cs * remove append() * simplify * wip * cleanup * add cache * cleanup otter init * some fixes * cleanup * test with a leak * remove const? * add const * wip * wip * allocate dynamic variables in Go memory * cleanup * typo * bump otter * chore: bump deps
This commit is contained in:
14
frankenphp.h
14
frankenphp.h
@@ -13,9 +13,15 @@
|
||||
|
||||
typedef struct go_string {
|
||||
size_t len;
|
||||
const char *data;
|
||||
char *data;
|
||||
} go_string;
|
||||
|
||||
typedef struct php_variable {
|
||||
const char *var;
|
||||
size_t data_len;
|
||||
char *data;
|
||||
} php_variable;
|
||||
|
||||
typedef struct frankenphp_version {
|
||||
unsigned char major_version;
|
||||
unsigned char minor_version;
|
||||
@@ -44,9 +50,9 @@ int frankenphp_update_server_context(
|
||||
char *auth_user, char *auth_password, int proto_num);
|
||||
int frankenphp_request_startup();
|
||||
int frankenphp_execute_script(char *file_name);
|
||||
void frankenphp_register_bulk_variables(char *known_variables[27],
|
||||
char **dynamic_variables, size_t size,
|
||||
zval *track_vars_array);
|
||||
void frankenphp_register_bulk_variables(go_string known_variables[27],
|
||||
php_variable *dynamic_variables,
|
||||
size_t size, zval *track_vars_array);
|
||||
|
||||
int frankenphp_execute_script_cli(char *script, int argc, char **argv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user