From 90760db56fa3fe54e1aa99d7c6914b544b1bf16d Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 16 Feb 2009 13:39:54 +0100 Subject: [PATCH] perl plugin: Do not pass NULL to newRV(). newRV() does not handle that correctly and causes a segfault instead. Now, we use PL_sv_undef instead. --- src/perl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/perl.c b/src/perl.c index f9c99387..9f91d018 100644 --- a/src/perl.c +++ b/src/perl.c @@ -992,14 +992,14 @@ static int pplugin_call_all (pTHX_ int type, ...) if (-1 == data_set2av (aTHX_ ds, pds)) { av_clear (pds); av_undef (pds); - pds = Nullav; + pds = (AV *)&PL_sv_undef; ret = -1; } if (-1 == value_list2hv (aTHX_ vl, ds, pvl)) { hv_clear (pvl); hv_undef (pvl); - pvl = Nullhv; + pvl = (HV *)&PL_sv_undef; ret = -1; } @@ -1038,7 +1038,7 @@ static int pplugin_call_all (pTHX_ int type, ...) if (-1 == notification2hv (aTHX_ n, notif)) { hv_clear (notif); hv_undef (notif); - notif = Nullhv; + notif = (HV *)&PL_sv_undef; ret = -1; } @@ -2023,7 +2023,7 @@ static int perl_config_plugin (pTHX_ oconfig_item_t *ci) hv_undef (config); log_err ("Unable to convert configuration to a Perl hash value."); - config = Nullhv; + config = (HV *)&PL_sv_undef; } ENTER; -- 2.11.0