10000 Don't need module_state struct at all · matplotlib/matplotlib@43e2d0b · GitHub
[go: up one dir, main page]

Skip to content

Commit 43e2d0b

Browse files
committed
Don't need module_state struct at all
1 parent f1c9c07 commit 43e2d0b

8 files changed

+18
-50
lines changed

lib/matplotlib/tri/_tri_wrapper.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,17 +478,12 @@ static PyTypeObject* PyTrapezoidMapTriFinder_init_type(PyObject* m, PyTypeObject
478478

479479
extern "C" {
480480

481-
struct module_state
482-
{
483-
int _dummy;
484-
};
485-
486481
#if PY3K
487482
static struct PyModuleDef moduledef = {
488483
PyModuleDef_HEAD_INIT,
489484
"_tri",
490485
NULL,
491-
sizeof(struct module_state),
486+
0,
492487
NULL,
493488
NULL,
494489
NULL,

src/_backend_agg_wrapper.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -725,17 +725,12 @@ static PyTypeObject *PyRendererAgg_init_type(PyObject *m, PyTypeObject *type)
725725

726726
extern "C" {
727727

728-
struct module_state
729-
{
730-
int _dummy;
731-
};
732-
733728
#if PY3K
734729
static struct PyModuleDef moduledef = {
735730
PyModuleDef_HEAD_INIT,
736731
"_backend_agg",
737732
NULL,
738-
sizeof(struct module_state),
733+
0,
739734
NULL,
740735
NULL,
741736
NULL,

src/_contour_wrapper.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,12 @@ static PyTypeObject* PyQuadContourGenerator_init_type(PyObject* m, PyTypeObject*
138138

139139
extern "C" {
140140

141-
struct module_state
142-
{
143-
int _dummy;
144-
};
145-
146141
#if PY3K
147142
static struct PyModuleDef moduledef = {
148143
PyModuleDef_HEAD_INIT,
149144
"_contour",
150145
NULL,
151-
sizeof(struct module_state),
146+
0,
152147
NULL,
153148
NULL,
154149
NULL,

src/_gtkagg.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,12 @@ static PyMethodDef module_methods[] = {
108108

109109
extern "C" {
110110

111-
struct module_state
112-
{
113-
int _dummy;
114-
};
115-
116111
#if PY3K
117112
static struct PyModuleDef moduledef = {
118113
PyModuleDef_HEAD_INIT,
119114
"_gtkagg",
120115
NULL,
121-
sizeof(struct module_state),
116+
0,
122117
module_methods,
123118
NULL,
124119
NULL,

src/_image_wrapper.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -728,17 +728,12 @@ static PyMethodDef module_functions[] = {
728728

729729
extern "C" {
730730

731-
struct module_state
732-
{
733-
int _dummy;
734-
};
735-
736731
#if PY3K
737732
static struct PyModuleDef moduledef = {
738733
PyModuleDef_HEAD_INIT,
739734
"_image",
740735
NULL,
741-
sizeof(struct module_state),
736+
0,
742737
module_functions,
743738
NULL,
744739
NULL,

src/_path_wrapper.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -730,17 +730,12 @@ extern "C" {
730730
{NULL}
731731
};
732732

733-
struct module_state
734-
{
735-
int _dummy;
736-
};
737-
738733
#if PY3K
739734
static struct PyModuleDef moduledef = {
740735
PyModuleDef_HEAD_INIT,
741736
"_path",
742737
NULL,
743-
sizeof(struct module_state),
738+
0,
744739
module_functions,
745740
NULL,
746741
NULL,

src/_png.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -520,17 +520,12 @@ static PyMethodDef module_methods[] = {
520520

521521
extern "C" {
522522

523-
struct module_state
524-
{
525-
int _dummy;
526-
};
527-
528523
#if PY3K
529524
static struct PyModuleDef moduledef = {
530525
PyModuleDef_HEAD_INIT,
531526
"_png",
532527
NULL,
533-
sizeof(struct module_state),
528+
0,
534529
module_methods,
535530
NULL,
536531
NULL,

src/ft2font_wrapper.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,15 +1640,18 @@ static PyTypeObject *PyFT2Font_init_type(PyObject *m, PyTypeObject *type)
16401640

16411641
extern "C" {
16421642

1643-
struct module_state
1644-
{
1645-
int _dummy;
1646-
};
1647-
16481643
#if PY3K
1649-
static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "ft2font", NULL,
1650-
sizeof(struct module_state), NULL, NULL,
1651-
NULL, NULL, NULL };
1644+
static struct PyModuleDef moduledef = {
1645+
PyModuleDef_HEAD_INIT,
1646+
"ft2font",
1647+
NULL,
1648+
0,
1649+
NULL,
1650+
NULL,
1651+
NULL,
1652+
NULL,
1653+
NULL
1654+
};
16521655

16531656
#define INITERROR return NULL
16541657

0 commit comments

Comments
 (0)
0