Numworks Epsilon  1.4.1
Graphing Calculator Operating System
objclosure.c File Reference
#include <string.h>
#include "py/obj.h"
#include "py/runtime.h"

Go to the source code of this file.

Classes

struct  _mp_obj_closure_t
 

Typedefs

typedef struct _mp_obj_closure_t mp_obj_closure_t
 

Functions

STATIC mp_obj_t closure_call (mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args)
 
STATIC void closure_print (const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind)
 
mp_obj_t mp_obj_new_closure (mp_obj_t fun, size_t n_closed_over, const mp_obj_t *closed)
 

Variables

const mp_obj_type_t closure_type
 

Typedef Documentation

◆ mp_obj_closure_t

Function Documentation

◆ closure_call()

STATIC mp_obj_t closure_call ( mp_obj_t  self_in,
size_t  n_args,
size_t  n_kw,
const mp_obj_t args 
)

Definition at line 39 of file objclosure.c.

◆ closure_print()

STATIC void closure_print ( const mp_print_t print,
mp_obj_t  o_in,
mp_print_kind_t  kind 
)

Definition at line 63 of file objclosure.c.

◆ mp_obj_new_closure()

mp_obj_t mp_obj_new_closure ( mp_obj_t  fun,
size_t  n_closed_over,
const mp_obj_t closed 
)

Definition at line 90 of file objclosure.c.

Variable Documentation

◆ closure_type

const mp_obj_type_t closure_type
Initial value:
= {
.name = MP_QSTR_closure,
.print = closure_print,
.call = closure_call,
}
STATIC mp_obj_t closure_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args)
Definition: objclosure.c:39
const mp_obj_type_t mp_type_type
Definition: objtype.c:969
STATIC void closure_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind)
Definition: objclosure.c:63
qstr name
Definition: obj.h:478

Definition at line 81 of file objclosure.c.