• Why can't the pointer in a PyCapsule be NULL?

    From Robert Latest@21:1/5 to All on Fri Dec 30 13:48:01 2022
    Hi all,

    the question is in the subject. I'd like the pointer to be able to be NULL because that would make my code slightly cleaner. No big deal though.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Robert Latest on Fri Dec 30 14:21:33 2022
    Robert Latest <boblatest@yahoo.com> writes:
    the question is in the subject. I'd like the pointer to be able to be NULL >because that would make my code slightly cleaner. No big deal though.

    In Usenet, it is considered good style to have all relevant
    content in the body. For example,

    |rec.games.frp.dnd FAQ: 2/9 -- Netiquette - faqs.org
    ...
    |When you have a descriptive subject, be sure to actually
    |include your question in the body of your post. It doesn't
    |matter if the subject line says it all,
    ...

    . On a superficial level, the answer is: "Because
    PyCapsule_GetPointer uses NULL to indicate failure."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert Latest@21:1/5 to Stefan Ram on Fri Dec 30 17:59:10 2022
    Stefan Ram wrote:
    Robert Latest <boblatest@yahoo.com> writes:
    the question is in the subject. I'd like the pointer to be able to be NULL >>because that would make my code slightly cleaner. No big deal though.

    In Usenet, it is considered good style to have all relevant
    content in the body.

    Makes sense.

    . On a superficial level, the answer is: "Because
    PyCapsule_GetPointer uses NULL to indicate failure."

    Makes sense, too. Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)