File: vartable.h

package info (click to toggle)
wreport 3.36-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,572 kB
  • sloc: cpp: 18,927; python: 583; sh: 78; makefile: 13
file content (35 lines) | stat: -rw-r--r-- 706 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef WREPORT_PYTHON_VARTABLE_H
#define WREPORT_PYTHON_VARTABLE_H

#include <wreport/python.h>
#include "utils/core.h"

extern "C" {

/// wreport.Vartable python object
typedef struct {
    PyObject_HEAD
    const wreport::Vartable* table;
} wrpy_Vartable;

/// wreport.Vartable python type
extern PyTypeObject* wrpy_Vartable_Type;

/// Check if an object is of wreport.Vartable type or subtype
#define wrpy_Vartable_Check(ob) \
    (Py_TYPE(ob) == wrpy_Vartable_Type || \
     PyType_IsSubtype(Py_TYPE(ob), wrpy_Vartable_Type))

}


namespace wreport {
namespace python {

PyObject* vartable_create(const wreport::Vartable* table);

void register_vartable(PyObject* m, wrpy_c_api& c_c_api);

}
}
#endif