From 4f545f9c6b314d845d25a64fb6425a3f24a4f627 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Tue, 25 May 1999 21:19:46 +0000 Subject: [PATCH] Allow unregistering content types as well. --- main/SAPI.c | 6 ++++++ main/SAPI.h | 1 + 2 files changed, 7 insertions(+) diff --git a/main/SAPI.c b/main/SAPI.c index e43e2dadac..9ae0d1973a 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -259,3 +259,9 @@ SAPI_API int sapi_register_post_reader(sapi_post_content_type_reader *post_conte { return zend_hash_add(&known_post_content_types, post_content_type_reader->content_type, post_content_type_reader->content_type_len+1, (void *) post_content_type_reader, sizeof(sapi_post_content_type_reader), NULL); } + + +SAPI_API void sapi_unregister_post_reader(sapi_post_content_type_reader *post_content_type_reader) +{ + zend_hash_del(&known_post_content_types, post_content_type_reader->content_type, post_content_type_reader->content_type_len+1); +} \ No newline at end of file diff --git a/main/SAPI.h b/main/SAPI.h index bf840441bd..fbbddf5f5d 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -101,6 +101,7 @@ SAPI_API int sapi_add_header(char *header_line, uint header_line_len); SAPI_API int sapi_send_headers(); SAPI_API int sapi_register_post_reader(sapi_post_content_type_reader *post_content_type_reader); +SAPI_API void sapi_unregister_post_reader(sapi_post_content_type_reader *post_content_type_reader); struct _sapi_module_struct { char *name; -- 2.40.0