PX_GET_FIELDS(3)

πŸ’– PX_GET_FIELDS(3) πŸ’–

okay bestie, so this one lives in the Library Functions Manual section of the library functions manual (yes, it's that girl) and it's literally the moment your Paradox file spills the tea about its fields ✨


🌸 NAME 🌸

PX_get_fields β€” hands you back the array of field definitions in a Paradox file πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <paradox.h>

pxfield_t *PX_get_fields(pxdoc_t *pxdoc)

like, that's it. one call, one pointer, one gorgeous little array of field meta data πŸŽ€


✨ DESCRIPTION ✨

So what does it actually do? It returns the meta data of all fields β€” every single field definition, in one glorious array. main character energy fr fr πŸ‘‘

Here's the lil tea though: this function is identical to calling PX_get_field(3) with a record number of 0. Same vibe, same result. BUT β€” and this is important, bestie, listen β€” for further releases you should not rely on it. It's giving "convenient shortcut" not "contract". 😭

And if you're out here wondering what the heck a pxfield_t even is? Go check PX_get_field(3), it has the full definition for you. iykyk 🫢


πŸ“ RETURN VALUE πŸ“

  • On success β€” returns a pointer to the field array. slay ✨
  • On failure β€” returns NULL. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

This manual page was written by Uwe Steinmann uwe@steinmann.cx. iconic of him honestly 🌈


lowkey a whole vibe check: NULL on failure means always check before you dereference, bestie. no cap. πŸ™ˆ

and that's the whole page!! it came from the Library Functions Manual, and it's stamped PX_GET_FIELDS(3) down at the bottom just like the original footer said. mwah, take care of your fields πŸ’–πŸ§šπŸ’