c-template
returns.h File Reference
#include "errors.h"
#include <stdlib.h>
Include dependency graph for returns.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cg_return
 allows returning both a value and error message from a function call useful as it makes it easier to provid better error message and handling similar to go More...
 

Functions

cg_returnnew_cg_return (void *value, cg_error *err)
 creates a new cg_return struct More...
 
void free_cg_return (cg_return *ret)
 frees up resources associated with an instance of cg_return More...
 

Function Documentation

◆ free_cg_return()

void free_cg_return ( cg_return ret)

frees up resources associated with an instance of cg_return

Definition at line 24 of file returns.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ new_cg_return()

cg_return* new_cg_return ( void *  value,
cg_error err 
)

creates a new cg_return struct

Definition at line 5 of file returns.c.

Here is the caller graph for this function: