8000 Use PyMODINIT_FUNC where appropriate. · matplotlib/matplotlib@25b6910 · GitHub
[go: up one dir, main page]

Skip to content

Commit 25b6910

Browse files
cgohlkemdboom
authored andcommitted
Use PyMODINIT_FUNC where appropriate.
1 parent 05745e9 commit 25b6910

File tree

8 files changed

+9
-608
lines changed

8 files changed

+9
-608
lines changed

src/_backend_agg.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,12 +2441,10 @@ void RendererAgg::init_type()
24412441
"restore_region(region, x1, y1, x2, y2, x3, y3)");
24422442
}
24432443

2444-
extern "C"
2445-
#if PY3K
24462444
PyMODINIT_FUNC
2445+
#if PY3K
24472446
PyInit__backend_agg(void)
24482447
#else
2449-
PyMODINIT_FUNC
24502448
init_backend_agg(void)
24512449
#endif
24522450
{

src/_backend_gdk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static PyMethodDef _backend_gdk_functions[] = {
5252
{ NULL, NULL, 0 }
5353
};
5454

55-
DL_EXPORT(void)
55+
PyMODINIT_FUNC
5656
init_backend_gdk(void)
5757
{
5858
PyObject *mod;

src/_gtkagg.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ class _gtkagg_module : public Py::ExtensionModule<_gtkagg_module>
131131
}
132132
};
133133

134-
135-
extern "C"
136-
DL_EXPORT(void)
134+
PyMODINIT_FUNC
137135
init_gtkagg(void)
138136
{
139137
init_pygobject();

src/_path.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,13 +1481,10 @@ _path_module::cleanup_path(const Py::Tuple& args)
14811481
return result;
14821482
}
14831483

1484-
#if PY3K
1485-
extern "C"
14861484
PyMODINIT_FUNC
1485+
#if PY3K
14871486
PyInit__path(void)
14881487
#else
1489-
extern "C"
1490-
PyMODINIT_FUNC
14911488
init_path(void)
14921489
#endif
14931490
{

src/_png.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,12 +568,10 @@ _png_module::read_png_uint8(const Py::Tuple& args)
568568
return Py::asObject(_read_png(args[0], false));
569569
}
570570

571-
extern "C"
572-
#if PY3K
573571
PyMODINIT_FUNC
572+
#if PY3K
574573
PyInit__png(void)
575574
#else
576-
PyMODINIT_FUNC
577575
init_png(void)
578576
#endif
579577
{

0 commit comments

Comments
 (0)
0