LOC_NEW(3)

✨ NAME ✨

okay so this is the LOC_NEW(3) manual page, and the star of the show is loc_new β€” it creates a new libloc context. That's the whole NAME vibe, vibe check passed, periodt. πŸ’…

🌸 SYNOPSIS 🌸

the whole signature situation is literally this, bestie β€” keep it exact, iykyk:

#include <libloc/libloc.h>

struct loc_ctx;

int loc_new(struct loc_ctx** ctx);

struct loc_ctx* loc_ref(struct loc_ctx* ctx);

struct loc_ctx* loc_unref(struct loc_ctx* ctx);

πŸ’– DESCRIPTION πŸ’–

okay so listen: every single operation in libloc requires you to set up a context first. no context, no main character energy. that setup is done by calling loc_new(3). πŸŽ€

and every time another part of your code is holding a reference to the context, you will need to call loc_ref() to increase the reference counter. yes bestie, it's giving reference-counting realness β€” slay. πŸ”₯

if you no longer need the context, you will need to call loc_unref(). not me reminding you to clean up, fr fr. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

  • libloc(3) β€” the other page you should lowkey check out too. πŸ‘‘

πŸ‘‘ AUTHORS πŸ‘‘

  • Michael Tremer β€” iconic, credited, periodt. ngl, we love to see it. 🫢

and that's the whole page, bestie β€” the footer says LOC_NEW(3) again (no source/version or date listed), so consider this your cute sign-off. πŸ’–πŸŒ·

πŸ“¦ where this page comes from