summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1d272ac)
raw | patch | inline | side by side (parent: 1d272ac)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 26 Aug 2008 09:52:53 +0000 (11:52 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 26 Aug 2008 16:59:47 +0000 (18:59 +0200) |
The current perl interpreter might change while parsing the configuration
(e.g. the first interpreter is created by the "LoadPlugin" option), so this is
to make sure that we're using the right interpreter at all times.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
(e.g. the first interpreter is created by the "LoadPlugin" option), so this is
to make sure that we're using the right interpreter at all times.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/perl.c | patch | blob | history |
diff --git a/src/perl.c b/src/perl.c
index 9cbd5937574fd453d3c2634ce1e796005d8a8368..8061e0bfd486b2425b21fcc3cc18bb9aa6f30c33 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
{
int i = 0;
- dTHX;
-
- /* dTHX does not get any valid values in case Perl
- * has not been initialized */
- if (NULL == perl_threads)
- aTHX = NULL;
+ dTHXa (NULL);
for (i = 0; i < ci->children_num; ++i) {
oconfig_item_t *c = ci->children + i;
+ if (NULL != perl_threads)
+ aTHX = PERL_GET_CONTEXT;
+
if (0 == strcasecmp (c->key, "LoadPlugin"))
perl_config_loadplugin (aTHX_ c);
else if (0 == strcasecmp (c->key, "BaseName"))