mirror of
https://github.com/postgres/postgres.git
synced 2025-04-29 13:56:47 +03:00
Initialise perl library as documented in perl API. Backpatch to release 7.4.
This commit is contained in:
parent
18b185cdf0
commit
64a4c69fbb
@ -33,7 +33,7 @@
|
|||||||
* ENHANCEMENTS, OR MODIFICATIONS.
|
* ENHANCEMENTS, OR MODIFICATIONS.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.94.2.10 2008/01/22 20:41:39 adunstan Exp $
|
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.94.2.11 2009/06/04 16:00:49 adunstan Exp $
|
||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
@ -282,6 +282,8 @@ plperl_init_interp(void)
|
|||||||
"", "-e", PERLBOOT
|
"", "-e", PERLBOOT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int nargs = 3;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -321,12 +323,16 @@ plperl_init_interp(void)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PERL_SYS_INIT3
|
||||||
|
PERL_SYS_INIT3(&nargs, (char ***) &embedding, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
plperl_interp = perl_alloc();
|
plperl_interp = perl_alloc();
|
||||||
if (!plperl_interp)
|
if (!plperl_interp)
|
||||||
elog(ERROR, "could not allocate Perl interpreter");
|
elog(ERROR, "could not allocate Perl interpreter");
|
||||||
|
|
||||||
perl_construct(plperl_interp);
|
perl_construct(plperl_interp);
|
||||||
perl_parse(plperl_interp, plperl_init_shared_libs, 3, embedding, NULL);
|
perl_parse(plperl_interp, plperl_init_shared_libs, nargs, embedding, NULL);
|
||||||
perl_run(plperl_interp);
|
perl_run(plperl_interp);
|
||||||
|
|
||||||
plperl_proc_hash = newHV();
|
plperl_proc_hash = newHV();
|
||||||
@ -375,7 +381,6 @@ plperl_init_interp(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
plperl_safe_init(void)
|
plperl_safe_init(void)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user