Commit 49526d5c authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  change include_handler to include_handler_fn_t, and clean up a nasty
  explicit cast that could float from the include_handler_fn_t declaration.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88785 13f79535-47bb-0310-9956-ffa450edef68
parent 2183ceb9
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2515,9 +2515,9 @@ static void send_parsed_content(apr_bucket_brigade **bb, request_rec *r,
            ctx->curr_tag_pos = &ctx->combined_tag[ctx->directive_length+1];

            handle_func = 
                (int (*)(include_ctx_t *, apr_bucket_brigade **, request_rec *,
                    ap_filter_t *, apr_bucket *, apr_bucket **))
                apr_hash_get(include_hash, ctx->combined_tag, ctx->directive_length+1);
                (include_handler_fn_t *)apr_hash_get(include_hash, 
                                                     ctx->combined_tag, 
                                                     ctx->directive_length+1);
            if (handle_func != NULL) {
                ret = (*handle_func)(ctx, bb, r, f, dptr, &content_head);
            }
@@ -2790,7 +2790,7 @@ static int includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
    return OK;
}

static void ap_register_include_handler(char *tag, include_handler *func)
static void ap_register_include_handler(char *tag, include_handler_fn_t *func)
{
    apr_hash_set(include_hash, tag, strlen(tag) + 1, (const void *)func);
}
+3 −3
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ if ((APR_BRIGADE_EMPTY(cntxt->ssi_tag_brigade)) && \
}


typedef int (include_handler)(include_ctx_t *ctx, apr_bucket_brigade **bb, 
typedef int (include_handler_fn_t)(include_ctx_t *ctx, apr_bucket_brigade **bb,
                       request_rec *r, ap_filter_t *f, apr_bucket *head_ptr, 
                       apr_bucket **inserted_head);

@@ -208,7 +208,7 @@ APR_DECLARE_OPTIONAL_FN(void, ap_ssi_parse_string, (request_rec *r,
                                                    char *out,
                                                    size_t length,
                                                    int leave_name));
APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler, (char *tag,
                                                         include_handler *func));
APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler, 
                        (char *tag, include_handler_fn_t *func));

#endif /* MOD_INCLUDE */