openldap/servers/slapd/back-perl/perl_back.h

55 lines
1.2 KiB
C
Raw Normal View History

/* $OpenLDAP$ */
/*
* Copyright 1999-2003 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#ifndef PERL_BACK_H
#define PERL_BACK_H 1
LDAP_BEGIN_DECL
/*
2003-03-13 09:58:26 +08:00
* From Apache mod_perl: test for Perl version.
*/
2003-03-13 09:58:26 +08:00
2003-03-13 10:01:14 +08:00
#if defined(pTHX_) || (PERL_REVISION > 5 || (PERL_REVISION == 5 && PERL_VERSION >= 6))
2002-04-16 11:47:39 +08:00
#define PERL_IS_5_6
#endif
#define EVAL_BUF_SIZE 500
extern ldap_pvt_thread_mutex_t perl_interpreter_mutex;
2003-03-13 09:58:26 +08:00
#ifdef PERL_IS_5_6
2002-04-16 12:25:44 +08:00
/* We should be using the PL_errgv, I think */
/* All the old style variables are prefixed with PL_ now */
# define errgv PL_errgv
# define na PL_na
#endif
2003-03-13 09:58:26 +08:00
#ifdef HAVE_WIN32_ASPERL
2002-04-16 12:25:44 +08:00
/* pTHX is needed often now */
# define PERL_INTERPRETER my_perl
# define PERL_BACK_XS_INIT_PARAMS pTHX
# define PERL_BACK_BOOT_DYNALOADER_PARAMS pTHX, CV *cv
#else
# define PERL_INTERPRETER perl_interpreter
# define PERL_BACK_XS_INIT_PARAMS void
# define PERL_BACK_BOOT_DYNALOADER_PARAMS CV *cv
#endif
extern PerlInterpreter *PERL_INTERPRETER;
typedef struct perl_backend_instance {
2002-04-16 11:47:39 +08:00
char *pb_module_name;
SV *pb_obj_ref;
int pb_filter_search_results;
} PerlBackend;
LDAP_END_DECL
#include "external.h"
#endif