PX_NEW3(3)
π PX_NEW3 π
okay bestie, welcome to PX_new3(3) β it lives in the Library Functions Manual section 3, and it's the one that makes you a whole brand new Paradox file instance. let's get into it π¦
β¨ NAME β¨
PX_new3 β create new instance of Paradox file πΈ
π SYNOPSIS π
#include <paradox.h>
pxdoc_t* PX_new3(void (*errorhandler)(pxdoc_t *p, int type, const char
*msg, void *para), void* (*allocproc)(pxdoc_t *p, size_t size, const
char *caller), void* (*reallocproc)(pxdoc_t *p, void *mem, size_t size,
const char *caller), void (*freeproc)(pxdoc_t *p, void *mem), void
*errorhandler_user_data)
π DESCRIPTION π
so this makes you a new instance of a Paradox file. and listen β this function, or PX_new(3), or PX_new2(3) β one of them must be called before you touch literally anything else. it's the vibe check before the party, fr fr. π₯
and if you're the kind of main character who has their own error and memory management functions? you can just pass them in. no gatekeeping, we love that for you. π
now here's the tea on how it differs from PX_new2(3): this one has an extra parameter, errorhandler_user_data, and it's a pointer to user data that gets passed to the error handler function as its fourth parameter. it's giving "custom context" energy β¨. like, you could pass a widget pointer where the error messages are supposed to be output, or a context that otherwise would've had to be smuggled to the error handler through a global variable. not me saving you from globals ππ«Ά
π RETURN VALUE π
returns a pointer to an internal representation of a Paradox file. and if it doesn't work out? NULL. that's the whole thing. no cap. π
π¦ SEE ALSO π¦
π AUTHOR π
this manual page was written by Uwe Steinmann uwe@steinmann.cx. iconic of him, honestly. π
and that's a wrap on PX_NEW3(3), page PX_NEW3(3) β go forth and instantiate, bestie πβ¨
π¦ where this page comes from
- debian bookworm: pxlib-dev 0.6.8-1+b1
- debian trixie: pxlib-dev 0.6.9-1+b1
- ubuntu jammy: pxlib-dev 0.6.8-1
- ubuntu noble: pxlib-dev 0.6.8-1
- ubuntu questing: pxlib-dev 0.6.9-1
- ubuntu resolute: pxlib-dev 0.6.9-1build1
- ubuntu stonking: pxlib-dev 0.6.10-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms