src/http/modules/perl/ngx_http_perl_module.h - nginx-1.7.10

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_str_t                 filename;
  16.     ngx_str_t                 redirect_uri;
  17.     ngx_str_t                 redirect_args;

  18.     SV                       *next;

  19.     ngx_uint_t                done;       /* unsigned  done:1; */

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

  21. #if (NGX_HTTP_SSI)
  22.     ngx_http_ssi_ctx_t       *ssi;
  23. #endif
  24. } ngx_http_perl_ctx_t;


  25. typedef struct {
  26.     ngx_uint_t    hash;
  27.     ngx_str_t     name;
  28.     ngx_str_t     value;
  29. } ngx_http_perl_var_t;


  30. extern ngx_module_t  ngx_http_perl_module;


  31. /*
  32. * workaround for "unused variable `Perl___notused'" warning
  33. * when building with perl 5.6.1
  34. */
  35. #ifndef PERL_IMPLICIT_CONTEXT
  36. #undef  dTHXa
  37. #define dTHXa(a)
  38. #endif


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


  40. void ngx_http_perl_handle_request(ngx_http_request_t *r);
  41. void ngx_http_perl_sleep_handler(ngx_http_request_t *r);


  42. #endif /* _NGX_HTTP_PERL_MODULE_H_INCLUDED_ */