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
- ubuntu stonking: libloc-dev 0.9.19-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms