mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 06:41:24 +03:00
Initialise perl library as documented in perl API. Backpatch to release 7.4.
This commit is contained in:
parent
f16cd6ec38
commit
d68475eb96
@ -33,7 +33,7 @@
|
|||||||
* ENHANCEMENTS, OR MODIFICATIONS.
|
* ENHANCEMENTS, OR MODIFICATIONS.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.40.2.1 2005/01/26 17:09:21 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.40.2.2 2009/06/04 16:01:23 adunstan Exp $
|
||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
@ -214,12 +214,18 @@ plperl_init_interp(void)
|
|||||||
"sub ::mkunsafefunc {return eval(qq[ sub { $_[0] } ]); }"
|
"sub ::mkunsafefunc {return eval(qq[ sub { $_[0] } ]); }"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int nargs = 3;
|
||||||
|
|
||||||
|
#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);
|
||||||
|
|
||||||
/************************************************************
|
/************************************************************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user