al_calloc(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

al_calloc β€” it's giving Allegro 5 API πŸ’– (this page lives in the 3alleg5 manual, bestie, that's the whole vibe)


πŸŽ€ SYNOPSIS πŸŽ€

Okay so first you gotta pull in the header, no cap:

#include <allegro5/allegro.h>

And then boom, it's a macro, she's defined like this:

#define al_calloc(c, n) \
   (al_calloc_with_context((c), (n), __LINE__, __FILE__, __func__))

Lowkey iconic that she sneaks __LINE__, __FILE__ and __func__ in there for you. 🫢


πŸ’… DESCRIPTION πŸ’…

So like, al_calloc() is the same energy as calloc() from the C standard library β€” except the implementation can be overridden. That's it, that's the whole tea. β˜•βœ¨

Heads up bestie: this is a macro. Not a function. A macro. Don't come for me, that's just what the page says. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


And that's the whole page, periodt. πŸ’– This lil cutie came straight out of the Allegro reference manual, so go forth and allocate responsibly, my main character. πŸŒΈπŸ‘‘

πŸ“¦ where this page comes from