libdballe  9.11
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
10 extern "C" {
11 struct _object;
12 typedef _object PyObject;
13 struct _typeobject;
14 typedef _typeobject PyTypeObject;
15 }
16 #endif
17 
18 extern "C" {
19 
30 struct dbapy_c_api {
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
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
unsigned version_minor
C API minor version (updated on backwards-compatible changes)
Definition: python.h:38
C++ functions exported by the wreport python bindings, to be used by other C++ bindings.
Definition: python.h:30