Code

RRDs.xs uses &PL_sv_undef to insert undefined values into arrays and hashes. This...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 31 Jul 2012 12:43:45 +0000 (12:43 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 31 Jul 2012 12:43:45 +0000 (12:43 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@2296 a5681a0c-68f1-0310-ab6d-d61299d08faa

bindings/perl-shared/RRDs.xs

index 25d44a51c555aa30312608e803fd4c121998dfc8..e1917a8c5c8a2f9e5c1551e98d6a8e163953665d 100644 (file)
@@ -85,7 +85,7 @@ extern "C" {
                    switch (data->type) { \
                    case RD_I_VAL: \
                        if (isnan(data->value.u_val)) \
-                           hvs(&PL_sv_undef); \
+                           hvs(newSV(0)); \
                        else \
                            hvs(newSVnv(data->value.u_val)); \
                        break; \
@@ -286,7 +286,7 @@ rrd_fetch(...)
                for (i = start+step; i <= end; i += step){
                        line = newAV();
                        for (ii = 0; ii < ds_cnt; ii++){
-                         av_push(line,(isnan(*datai) ? &PL_sv_undef : newSVnv(*datai)));
+                         av_push(line,(isnan(*datai) ? newSV(0) : newSVnv(*datai)));
                          datai++;
                        }
                        av_push(retar,newRV_noinc((SV*)line));
@@ -366,7 +366,7 @@ rrd_xport(...)
                for (i = start+step; i <= end; i += step){
                        line = newAV();
                        for (ii = 0; ii < col_cnt; ii++){
-                         av_push(line,(isnan(*ptr) ? &PL_sv_undef : newSVnv(*ptr)));
+                         av_push(line,(isnan(*ptr) ? newSV(0) : newSVnv(*ptr)));
                          ptr++;
                        }
                        av_push(retar,newRV_noinc((SV*)line));