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