src/http/modules/perl/ngx_http_perl_module.h - nginx-1.31.4 nginx/ @ 8d9666701

Data types defined

Macros defined

Source code


  1. /*
  2. * Copyright (C) Igor Sysoev
  3. * Copyright (C) Nginx, Inc.
  4. */


  5. #ifndef _NGX_HTTP_PERL_MODULE_H_INCLUDED_
  6. #define _NGX_HTTP_PERL_MODULE_H_INCLUDED_


  7. #include <ngx_config.h>
  8. #include <ngx_core.h>
  9. #include <ngx_http.h>
  10. #include <nginx.h>

  11. #include <EXTERN.h>
  12. #include <perl.h>


  13. typedef ngx_http_request_t   *nginx;

  14. typedef struct {
  15.     ngx_http_request_t       *request;

  16.     ngx_str_t                 filename;
  17.     ngx_str_t                 redirect_uri;

  18.     SV                       *next;

  19.     ngx_int_t                 status;

  20.     unsigned                  done:1;
  21.     unsigned                  error:1;
  22.     unsigned                  variable:1;
  23.     unsigned                  header_sent:1;

  24.     ngx_array_t              *variables;  /* array of ngx_http_perl_var_t */

  25. #if (NGX_HTTP_SSI)
  26.     ngx_http_ssi_ctx_t       *ssi;
  27. #endif
  28. } ngx_http_perl_ctx_t;


  29. typedef struct {
  30.     ngx_uint_t    hash;
  31.     ngx_str_t     name;
  32.     ngx_str_t     value;
  33. } ngx_http_perl_var_t;


  34. typedef struct {
  35.     ngx_http_request_t       *request;
  36.     SV                       *sv;
  37. } ngx_http_perl_cleanup_t;


  38. extern ngx_module_t  ngx_http_perl_module;


  39. extern ngx_http_perl_ctx_t  *ngx_http_perl_active_context;


  40. /*
  41. * workaround for "unused variable `Perl___notused'" warning
  42. * when building with perl 5.6.1
  43. */
  44. #ifndef PERL_IMPLICIT_CONTEXT
  45. #undef  dTHXa
  46. #define dTHXa(a)
  47. #endif


  48. extern void boot_DynaLoader(pTHX_ CV* cv);


  49. void ngx_http_perl_handle_request(ngx_http_request_t *r);
  50. void ngx_http_perl_sleep_handler(ngx_http_request_t *r);
  51. void ngx_http_perl_refcount_cleanup(void *data);


  52. #endif /* _NGX_HTTP_PERL_MODULE_H_INCLUDED_ */