Refactor register shutdown function mechanism

Use FCI/FCC structure instead of custom implementation which does the same.
This also fixes the "bug" which prevented static methods from being shutdown functions.

Closes GH-5829

Co-authored-by: Aaron Piotrowski <aaron@trowski.com>
This commit is contained in:
George Peter Banyard 2021-05-10 12:05:41 +01:00
parent fcd18757b2
commit a9695cc615
No known key found for this signature in database
GPG key ID: D49A095D7329F6DC
5 changed files with 39 additions and 50 deletions

View file

@ -143,9 +143,8 @@ PHPAPI double php_get_nan(void);
PHPAPI double php_get_inf(void);
typedef struct _php_shutdown_function_entry {
zval function_name;
zval *arguments;
int arg_count;
zend_fcall_info fci;
zend_fcall_info_cache fci_cache;
} php_shutdown_function_entry;
PHPAPI extern bool register_user_shutdown_function(const char *function_name, size_t function_len, php_shutdown_function_entry *shutdown_function_entry);