logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

lc_ctx_new, lc_ctx_free - create and free Librecast contexts

Description

lc_ctx_new() creates a new Librecast context and sets up the environment.  Call lc_ctx_free(3) when done.

       lc_ctx_free() invalidates and frees a Librecast context created with lc_ctx_new(3)

Errors

lc_ctx_new() can fail with the following error:

       ENOMEM Out  of  memory.   Possibly,  the  application hit the RLIMIT_AS or RLIMIT_DATA limit described in
              getrlimit(2).

Example

Programsource

       lc_ctx_t *lctx;
       lctx = lc_ctx_new();

       /* your Librecast program here */

       lc_ctx_free(lctx); /* free context when done */

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       lc_ctx_new, lc_ctx_free - create and free Librecast contexts

Return Value

lc_ctx_new() returns a pointer to a lc_ctx_t handle.  On error returns NULL and sets errno to ENOMEM.

       The lc_ctx_free() function returns no value.

See Also

lc_ctx_free(3)

LIBRECAST                                          2020-08-01                                      LC_CTX_NEW(3)

Synopsis

#include<librecast/net.h>lc_ctx_t*lc_ctx_new(void);voidlc_ctx_free(lc_ctx_t*ctx);

       Compile and link with -llibrecast.

See Also