Krita Source Code Documentation
Loading...
Searching...
No Matches
PykritaModule.cpp File Reference
#include "PykritaModule.h"
#include "kis_debug.h"

Go to the source code of this file.

Classes

struct  module_state
 

Namespaces

namespace  PYKRITA
 

Macros

#define GETSTATE(m)   ((struct module_state*)PyModule_GetState(m))
 
#define INITERROR   return NULL
 

Functions

PyObject * PYKRITA::debug (PyObject *, PyObject *args)
 
PyMODINIT_FUNC PYKRITA_INIT ()
 
PyObject * PYKRITA::qt_major_version (PyObject *, PyObject *args)
 

Variables

static struct PyModuleDef moduledef
 

Macro Definition Documentation

◆ GETSTATE

#define GETSTATE ( m)    ((struct module_state*)PyModule_GetState(m))

Definition at line 19 of file PykritaModule.cpp.

◆ INITERROR

#define INITERROR   return NULL

Definition at line 74 of file PykritaModule.cpp.

Function Documentation

◆ PYKRITA_INIT()

PyMODINIT_FUNC PYKRITA_INIT ( )

Definition at line 76 of file PykritaModule.cpp.

77{
78 PyObject *pykritaModule = PyModule_Create(&moduledef);
79
80 if (pykritaModule == NULL)
82
83 PyModule_AddStringConstant(pykritaModule, "__file__", __FILE__);
84
85 return pykritaModule;
86}
static struct PyModuleDef moduledef
#define INITERROR

References INITERROR, and moduledef.

Variable Documentation

◆ moduledef

struct PyModuleDef moduledef
static
Initial value:
= {
PyModuleDef_HEAD_INIT
, "pykrita"
, "The pykrita module"
, -1
, pykritaMethods
, 0
, 0
, 0
, 0
}

Definition at line 62 of file PykritaModule.cpp.

62 {
63 PyModuleDef_HEAD_INIT
64 , "pykrita"
65 , "The pykrita module"
66 , -1
67 , pykritaMethods
68 , 0
69 , 0
70 , 0
71 , 0
72};