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 ()
 

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 62 of file PykritaModule.cpp.

Function Documentation

◆ PYKRITA_INIT()

PyMODINIT_FUNC PYKRITA_INIT ( )

Definition at line 64 of file PykritaModule.cpp.

65{
66 PyObject *pykritaModule = PyModule_Create(&moduledef);
67
68 if (pykritaModule == NULL)
70
71 PyModule_AddStringConstant(pykritaModule, "__file__", __FILE__);
72
73 return pykritaModule;
74}
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 50 of file PykritaModule.cpp.

50 {
51 PyModuleDef_HEAD_INIT
52 , "pykrita"
53 , "The pykrita module"
54 , -1
55 , pykritaMethods
56 , 0
57 , 0
58 , 0
59 , 0
60};