Bug ID 1200990
Summary yast2-perl-bindings does not work with perl-5.36.0
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component YaST2
Assignee yast2-maintainers@suse.de
Reporter mls@suse.com
QA Contact jsrain@suse.com
Found By ---
Blocker ---

New perl versions like 5.36.0, calling SvPV or SvPV_nolen will no longer set
the POK flag. The perldelta man page says:

Reading the string form of an integer value no longer sets the flag SVf_POK.
The string form is still cached internally, and still re-read directly by the
macros SvPV(sv) etc (inline, without calling a C function). XS code that
already calls the APIs to get values will not be affected by this change. XS
code that accesses flags directly instead of using API calls to express its
intent might break, but such code likely is already buggy if passed some other
values, such as floating point values or objects with string overloading.

The code in yast2-perl-bindings relies on the old behavior in a couple of
places. For example, YPerl::fromPerlScalarToAny looks like this:

const char *pv = SvPV_nolen (sv);
if (SvPOK (sv))
{
    val = YCPString (pv);
}

This will no longer work. Please change the if condition to:

if (SvPOK(sv) || SvIOK(sv) || SvNOK(sv))


You are receiving this mail because: