reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
python_port.h
Go to the documentation of this file.
1
34#ifndef PYTHON_PORT_H
35#define PYTHON_PORT_H
36
37#include <Python.h>
38#include <structmember.h>
39#include <stdbool.h>
40
42#include "lf_types.h"
43#include "port.h"
44#include "python_action.h"
45
46extern PyTypeObject py_port_capsule_t;
47
57typedef struct {
58 size_t element_size; // token_type_t
59 void (*destructor)(void* value); // token_type_t
60 void* (*copy_constructor)(void* value); // token_type_t
61 lf_token_t* token; // token_template_t
62 size_t length; // token_template_t
63 bool is_present; // lf_port_base_t
64 lf_port_internal_t _base; // lf_port_internal_t
65 PyObject* value;
68
91typedef struct {
92 PyObject_HEAD PyObject* port;
93 PyObject* value;
95 int width;
99
100void python_count_decrement(void* py_object);
101#endif
Type definitions that are widely used across different parts of the runtime.
#define FEDERATED_CAPSULE_EXTENSION
Definition python_capsule_extension.h:75
#define FEDERATED_GENERIC_EXTENSION
Definition python_capsule_extension.h:74
PyTypeObject py_port_capsule_t
Definition python_port.c:384
void python_count_decrement(void *py_object)
Definition python_port.c:50
Definition python_port.h:91
long current_index
Definition python_port.h:96
int width
Definition python_port.h:95
PyObject_HEAD PyObject * port
Definition python_port.h:92
PyObject * value
Definition python_port.h:93
bool is_present
Definition python_port.h:94
Definition python_port.h:57
size_t length
Definition python_port.h:62
PyObject * value
Definition python_port.h:65
lf_token_t * token
Definition python_port.h:61
bool is_present
Definition python_port.h:63
lf_port_internal_t _base
Definition python_port.h:64
size_t element_size
Definition python_port.h:58
Internal part of the port structs. HAS TO MATCH lf_port_base_t after tmplt and is_present.
Definition lf_types.h:315
Definition lf_token.h:94