Conversation
|
@khwilliamson - please let me know if you feel the corresponding |
IMO those are internals, and nothing other than a few core functions involved in adding/removing magic should ever set/unset these flags. |
| This is typically used prior to assigning a value to the SV, as magic it | ||
| could influence exactly how and where the value is actually stored. |
There was a problem hiding this comment.
You normally check it after modifying the SV, and typically via SvSETMAGIC()
There was a problem hiding this comment.
IMO those are internals
Agreed. In a better of all possible worlds, we would document these as internal. But my thinking is it's not worth it. I think their usage is obvious to someone who's messing with the internals, so there are more important things to do instead.
| This is typically used prior to assigning a value to the SV, as magic it | ||
| could influence exactly how and where the value is actually stored. | ||
|
|
||
| =for apidoc Am|U32|SvAMAGICAL|SV* sv |
There was a problem hiding this comment.
There is no such macro - did you mean SvAMAGIC()?
|
This misses SvRMAGICAL(), which is similar to Sv[GS]?MAGICAL() in that it just checks the flags of the given SV, while SvAMAGIC() should have get magic checked first. |
|
|
||
| Remove any string offset. | ||
|
|
||
| =for apidoc Am|U32|SvMAGICAL|SV* sv |
There was a problem hiding this comment.
I thought a blank line had to separate the apidoc line from the explanatory text, but if it works as-is I don't care
But it is suspicious to me that the return is a U32, when I would be expecting a bool from the description. I think that needs to be addressed
This PR adds some simple descriptions for the following macros for the benefit of perlapi:
Closes #18956