Re: Reördering SVt_* constants; "internal" SV type

[email protected] ("Paul \"LeoNerd\" Evans") Thu, 18 Jun 2026 13:40:09 +0100
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
On Thu, 18 Jun 2026 12:52:45 +0100
Dagfinn Ilmari Mannsåker <[email protected]> wrote:

> This is a sensible goal, but I don't think the checks should actually
> be written out as <= comparisons, that should be an implementation
> detail hidden behind a macro or static inline function.

Ohright, yes; I meant to explain that bit.

Right now one of my branches has:

+/* BIG TODO: This has false positives (SVt_INVLIST)
+ */
+#define SvTYPE_IS_SCALAR(sv)    ((SvTYPE(sv) <= SVt_PVMG) || (SvTYPE(sv) == SVt_PVLV))

So it's just that I wanted a simpler comparison in the body of that
macro.

-- 
Paul "LeoNerd" Evans

[email protected]
http://www.leonerd.org.uk/  |  https://metacpan.org/author/PEVANS