libdballe 9.6
python.h
1#ifndef DBALLE_PYTHON_H
2#define DBALLE_PYTHON_H
3
4#include <dballe/fwd.h>
5#include <memory>
6
7#ifndef PyObject_HEAD
8// Forward-declare PyObjetc and PyTypeObject
9// see https://mail.python.org/pipermail/python-dev/2003-August/037601.html
10extern "C" {
11struct _object;
12typedef _object PyObject;
13struct _typeobject;
14typedef _typeobject PyTypeObject;
15}
16#endif
17
18extern "C" {
19
31
32// API version 1.x
33
35 unsigned version_major;
36
38 unsigned version_minor;
39
41 PyTypeObject* message_type;
42
44 PyObject* (*message_create_new)(dballe::MessageType);
45
47 PyObject* (*message_create)(std::shared_ptr<dballe::Message>);
48};
49
50}
51
52#endif
C++ functions exported by the wreport python bindings, to be used by other C++ bindings.
Definition: python.h:30
unsigned version_minor
C API minor version (updated on backwards-compatible changes)
Definition: python.h:38
PyTypeObject * message_type
dballe.Message type
Definition: python.h:41
unsigned version_major
C API major version (updated on incompatible changes)
Definition: python.h:35