develooper Front page | perl.perl5.porters | Postings from October 2015

[perl #126469] sv_reftype second argument is not described

Thread Previous
Ben Bullock
October 28, 2015 06:16
[perl #126469] sv_reftype second argument is not described
Message ID:
# New Ticket Created by  Ben Bullock 
# Please include the string:  [perl #126469]
# in the subject line of all future correspondence about this issue. 
# <URL: >

There is no documentation of the second argument of sv_reftype.

Looking at the code in sv.c, it looks like

    if (ob && SvOBJECT(sv)) {
	return SvPV_nolen_const(sv_ref(NULL, sv, ob));
    else {
       // only returns Perl-internal types like "SCALAR", not object types.

Thus it seems "ob" should be true if we want to return object information, and false if we don't. I suggest documenting the second argument. Also, in case this is an omission, I'd like to point out that the SvOBJECT, SvOBJECT_on, and SvOBJECT_off macros are not documented anywhere in perlapi.

I am using Perl 5.18.2, but I checked the documentation of perlapi in 22.0 using the following web page:

The documentation of sv_reftype, SvOBJECT, and SvOBJECT_on/off don't seem to have altered.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About