lc_ctx_new(3)

lc_ctx_new3

Create and free librecast contexts

Usage

#include <librecast/net.h>

lc_ctx_t *lc_ctx_new(void); void lc_ctx_free(lc_ctx_t *ctx);

Compile and link with -llibrecast.

Library

Librecast library (liblibrecast, -llibrecast)

Overview

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)

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.

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).

Examples

Program source

lc_ctx_t *lctx;
lctx = lc_ctx_new();
/* your Librecast program here */
lc_ctx_free(lctx); /* free context when done */

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

From liblibrecast-dev 0.9.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.