]> git.sur5r.net Git - openldap/blob - servers/slapd/back-perl/perl_back.h
Misc updates from HEAD
[openldap] / servers / slapd / back-perl / perl_back.h
1 /* $OpenLDAP$ */
2 #ifndef PERL_BACK_H
3 #define PERL_BACK_H 1
4
5 LDAP_BEGIN_DECL
6
7 /*
8  * From Apache mod_perl: test for Perl version.
9  */
10
11 #if defined(pTHX_) || (PERL_REVISION > 5 || (PERL_REVISION == 5 && PERL_VERSION >= 6))
12 #define PERL_IS_5_6
13 #endif
14
15 #define EVAL_BUF_SIZE 500
16
17 extern ldap_pvt_thread_mutex_t  perl_interpreter_mutex;
18
19 #ifdef PERL_IS_5_6
20 /* We should be using the PL_errgv, I think */
21 /* All the old style variables are prefixed with PL_ now */
22 # define errgv  PL_errgv
23 # define na     PL_na
24 #endif
25
26 #ifdef HAVE_WIN32_ASPERL
27 /* pTHX is needed often now */
28 # define PERL_INTERPRETER                       my_perl
29 # define PERL_BACK_XS_INIT_PARAMS               pTHX
30 # define PERL_BACK_BOOT_DYNALOADER_PARAMS       pTHX, CV *cv
31 #else
32 # define PERL_INTERPRETER                       perl_interpreter
33 # define PERL_BACK_XS_INIT_PARAMS               void
34 # define PERL_BACK_BOOT_DYNALOADER_PARAMS       CV *cv
35 #endif
36
37 extern PerlInterpreter *PERL_INTERPRETER;
38
39
40 typedef struct perl_backend_instance {
41         char    *pb_module_name;
42         SV      *pb_obj_ref;
43         int     pb_filter_search_results;
44 } PerlBackend;
45
46 LDAP_END_DECL
47
48 #include "external.h"
49
50 #endif