httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: cvs commit: httpd-apreq-2/glue/perl/xsbuilder/Apache/Upload Apache__Upload.h
Date Sat, 27 Nov 2004 16:42:02 GMT
Stas Bekman <stas@stason.org> writes:

[...]

>>    {
>>        SV *rv = sv_setref_pv(newSV(0), class, obj);
>>        if (env) {
>>   @@ -120,7 +120,7 @@
>>             * 5.8.x is OK with the old way as well, but in the future
>>             * we may have to use "#if PERL_VERSION < 8" ...
>>             */
>>   -        sv_magic(SvRV(rv), Nullsv, PERL_MAGIC_ext, Nullch, -1);
>>   +        sv_magic(SvRV(rv), parent, PERL_MAGIC_ext, Nullch, -1);
>>            SvMAGIC(SvRV(rv))->mg_ptr = env;
>>        }
>>        return rv;
>
> 1) the new param is undocumented (not sure how to explain it, see below)
>
> 2) what happens if env == NULL? The parent dependancy will not be
> created. (see the suggested fix below) If my correction is right,
> should the comment be moved up too?

It might be worthwhile to include an assert(env != NULL) in that
function and see what happens.  We may not need the conditional 
at all. But if we really do need it, I think the sv_magic() call 
should stay where it is.

-- 
Joe Schaefer


Mime
View raw message