1LOC_NEW(3) LOC_NEW(3)
2
3
4
6 loc_new - Create a new libloc context
7
9 #include <libloc/libloc.h>
10
11 struct loc_ctx;
12
13 int loc_new(struct loc_ctx** ctx);
14
15 struct loc_ctx* loc_ref(struct loc_ctx* ctx);
16
17 struct loc_ctx* loc_unref(struct loc_ctx* ctx);
18
20 Every operation in libloc requires to set up a context first. This is
21 done by calling loc_new(3).
22
23 Every time another part of your code is holding a reference to the
24 context, you will need to call loc_ref() to increase the reference
25 counter. If you no longer need the context, you will need to call
26 loc_unref().
27
29 libloc(3)
30
32 Michael Tremer
33
34
35
36 LOC_NEW(3)