request macro

FossilOrigin-Name: 772a47d24d0ba6364561f29f8dad44abb63f267458ff893c998047574a99e7ff
This commit is contained in:
nekobit 2022-08-23 17:01:32 +00:00
parent dceb8881bb
commit 78c68f5a92

View file

@ -25,7 +25,13 @@
#include <fcgi_stdio.h>
#include <fcgiapp.h>
#define PATH_ARGS FCGX_Request* req, struct session* ssn, mastodont_t* api, char** data
#ifdef SINGLE_THREADED
#define REQUEST_T FCGX_Request*
#else
#define REQUEST_T void*
#endif
#define PATH_ARGS REQUEST_T* req, struct session* ssn, mastodont_t* api, char** data
struct path_info
{
@ -33,13 +39,19 @@ struct path_info
void (*callback)(PATH_ARGS);
};
void handle_paths(FCGX_Request* req,
struct session* ssn,
mastodont_t* api,
struct path_info* paths,
size_t paths_len);
void handle_paths(
#ifdef SINGLE_THREADED
void*
#else
FCGX_Request*
#endif
req,
struct session* ssn,
mastodont_t* api,
struct path_info* paths,
size_t paths_len);
int parse_path(FCGX_Request* req,
int parse_path(REQUEST_T req,
struct session* ssn,
mastodont_t* api,
struct path_info* path_info);