perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

perlapi: Merge uvchr_to_utf8, _flags entries

Open khwilliamson opened this issue 1 year ago • 2 comments

khwilliamson avatar Jun 29 '24 20:06 khwilliamson

@khwilliamson, when I build this branch and call perldoc/pod/perlapi.pod, I get this (trimmed):

    "uvchr_to_utf8_flags_msgs"
        THIS FUNCTION SHOULD BE USED IN ONLY VERY SPECIALIZED CIRCUMSTANCES.

        Most code should use ""uvchr_to_utf8_flags"()" rather than call this
        directly.
...
            U8 *  uvchr_to_utf8_flags_msgs(U8 *d, UV uv, UV flags, HV **msgs)

    "uvchr_to_utf8"
    "uvchr_to_utf8_flags"
        These each add the UTF-8 representation of the native code point
        "uv" to the end of the string "d"; "d" should have at least
        "UVCHR_SKIP(uv)+1" (up to "UTF8_MAXBYTES+1") free bytes available.
        The return value is the pointer to the byte after the end of the new
        character. In other words,
...

            U8 *  uvchr_to_utf8      (U8 *d, UV uv)
            U8 *  uvchr_to_utf8_flags(U8 *d, UV uv, UV flags)

In other words, I get 2 entries for 3 API calls. The first line of the documentation for uvchr_to_utf8_flags_msgs suggests that it should rarely be used. Given that, would it be possible to position it after uvchr_to_utf8 and uvchr_to_utf8_flags in the generated POD?

jkeenan avatar Jun 29 '24 20:06 jkeenan

The pod is intended to be dictionary ordered, first by section, then same within each section. There are problems with its current ordering; I have wip to fix that. That would automatically reorder these entries

khwilliamson avatar Jun 30 '24 00:06 khwilliamson