8000 Merge pull request #21628 from hoodmane/main · matplotlib/matplotlib@6552a81 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6552a81

Browse files
authored
Merge pull request #21628 from hoodmane/main
Fix METH_VARARGS method signatures
2 parents aae1386 + d36e0f8 commit 6552a81

File tree

5 files changed

+62
-62
lines changed
  • < 8000 div class="PRIVATE_TreeView-item-toggle PRIVATE_TreeView-item-toggle--end prc-TreeView-TreeViewItemToggle-gWUdE prc-TreeView-TreeViewItemToggleHover-nEgP- prc-TreeView-TreeViewItemToggleEnd-t-AEB">
    src

5 files changed

+62
-62
lines changed

src/_backend_agg_wrapper.cpp

Lines changed: 16 additions & 16 deletions
GCAgg gc;
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ static void PyBufferRegion_dealloc(PyBufferRegion *self)
4040
Py_TYPE(self)->tp_free((PyObject *)self);
4141
}
4242

43-
static PyObject *PyBufferRegion_to_string(PyBufferRegion *self, PyObject *args, PyObject *kwds)
43+
static PyObject *PyBufferRegion_to_string(PyBufferRegion *self, PyObject *args)
4444
{
4545
return PyBytes_FromStringAndSize((const char *)self->x->get_data(),
4646
self->x->get_height() * self->x->get_stride());
4747
}
4848

4949
/* TODO: This doesn't seem to be used internally. Remove? */
5050

51-
static PyObject *PyBufferRegion_set_x(PyBufferRegion *self, PyObject *args, PyObject *kwds)
51+
static PyObject *PyBufferRegion_set_x(PyBufferRegion *self, PyObject *args)
5252
{
5353
int x;
5454
if (!PyArg_ParseTuple(args, "i:set_x", &x)) {
@@ -59,7 +59,7 @@ static PyObject *PyBufferRegion_set_x(PyBufferRegion *self, PyObject *args, PyOb
5959
Py_RETURN_NONE;
6060
}
6161

62-
static PyObject *PyBufferRegion_set_y(PyBufferRegion *self, PyObject *args, PyObject *kwds)
62+
static PyObject *PyBufferRegion_set_y(PyBufferRegion *self, PyObject *args)
6363
{
6464
int y;
6565
if (!PyArg_ParseTuple(args, "i:set_y", &y)) {
@@ -70,14 +70,14 @@ static PyObject *PyBufferRegion_set_y(PyBufferRegion *self, PyObject *args, PyOb
7070
Py_RETURN_NONE;
7171
}
7272

73-
static PyObject *PyBufferRegion_get_extents(PyBufferRegion *self, PyObject *args, PyObject *kwds)
73+
static PyObject *PyBufferRegion_get_extents(PyBufferRegion *self, PyObject *args)
7474
{
7575
agg::rect_i rect = self->x->get_rect();
7676

7777
return Py_BuildValue("IIII", rect.x1, rect.y1, rect.x2, rect.y2);
7878
}
7979

80-
static PyObject *PyBufferRegion_to_string_argb(PyBufferRegion *self, PyObject *args, PyObject *kwds)
80+
static PyObject *PyBufferRegion_to_string_argb(PyBufferRegion *self, PyObject *args)
8181
{
8282
PyObject *bufobj;
8383
uint8_t *buf;
@@ -198,7 +198,7 @@ static void PyRendererAgg_dealloc(PyRendererAgg *self)
198198
Py_TYPE(self)->tp_free((PyObject *)self);
199199
}
200200

201-
static PyObject *PyRendererAgg_draw_path(PyRendererAgg *self, PyObject *args, PyObject *kwds)
201+
static PyObject *PyRendererAgg_draw_path(PyRendererAgg *self, PyObject *args)
202202
{
203203
204204
py::PathIterator path;
@@ -227,7 +227,7 @@ static PyObject *PyRendererAgg_draw_path(PyRendererAgg *self, PyObject *args, Py
227227
Py_RETURN_NONE;
228228
}
229229

230-
static PyObject *PyRendererAgg_draw_text_image(PyRendererAgg *self, PyObject *args, PyObject *kwds)
230+
static PyObject *PyRendererAgg_draw_text_image(PyRendererAgg *self, PyObject *args)
231231
{
232232
numpy::array_view<agg::int8u, 2> image;
233233
double x;
@@ -252,7 +252,7 @@ static PyObject *PyRendererAgg_draw_text_image(PyRendererAgg *self, PyObject *ar
252252
Py_RETURN_NONE;
253253
}
254254

255-
PyObject *PyRendererAgg_draw_markers(PyRendererAgg *self, PyObject *args, PyObject *kwds)
255+
PyObject *PyRendererAgg_draw_markers(PyRendererAgg *self, PyObject *args)
256256
{
257257
GCAgg gc;
258258
py::PathIterator marker_path;
@@ -288,7 +288,7 @@ PyObject *PyRendererAgg_draw_markers(PyRendererAgg *self, PyObject *args, PyObje
288288
Py_RETURN_NONE;
289289
}
290290

291-
static PyObject *PyRendererAgg_draw_image(PyRendererAgg *self, PyObject *args, PyObject *kwds)
291+
static PyObject *PyRendererAgg_draw_image(PyRendererAgg *self, PyObject *args)
292292
{
293293
GCAgg gc;
294294
double x;
@@ -316,7 +316,7 @@ static PyObject *PyRendererAgg_draw_image(PyRendererAgg *self, PyObject *args, P
316316
}
317317

318318
static PyObject *
319-
PyRendererAgg_draw_path_collection(PyRendererAgg *self, PyObject *args, PyObject *kwds)
319+
PyRendererAgg_draw_path_collection(PyRendererAgg *self, PyObject *args)
320320
{
321321
GCAgg gc;
322322
agg::trans_affine master_transform;
@@ -377,7 +377,7 @@ PyRendererAgg_draw_path_collection(PyRendererAgg *self, PyObject *args, PyObject
377377
Py_RETURN_NONE;
378378
}
379379

380-
static PyObject *PyRendererAgg_draw_quad_mesh(PyRendererAgg *self, PyObject *args, PyObject *kwds)
380+
static PyObject *PyRendererAgg_draw_quad_mesh(PyRendererAgg *self, PyObject *args)
381381
{
382382
GCAgg gc;
383383
agg::trans_affine master_transform;
@@ -429,7 +429,7 @@ static PyObject *PyRendererAgg_draw_quad_mesh(PyRendererAgg *self, PyObject *arg
429429
}
430430

431431
static PyObject *
432-
PyRendererAgg_draw_gouraud_triangle(PyRendererAgg *self, PyObject *args, PyObject *kwds)
432+
PyRendererAgg_draw_gouraud_triangle(PyRendererAgg *self, PyObject *args)
433433
{
434434
GCAgg gc;
435435
numpy::array_view<const double, 2> points;
@@ -470,7 +470,7 @@ PyRendererAgg_draw_gouraud_triangle(PyRendererAgg *self, PyObject *args, PyObjec
470470
}
471471

472472
static PyObject *
473-
PyRendererAgg_draw_gouraud_triangles(PyRendererAgg *self, PyObject *args, PyObject *kwds)
473+
PyRendererAgg_draw_gouraud_triangles(PyRendererAgg *self, PyObject *args)
474474
{
475475
GCAgg gc;
476476
numpy::array_view<const double, 3> points;
@@ -540,14 +540,14 @@ int PyRendererAgg_get_buffer(PyRendererAgg *self, Py_buffer *buf, int flags)
540540
return 1;
541541
}
542542

543-
static PyObject *PyRendererAgg_clear(PyRendererAgg *self, PyObject *args, PyObject *kwds)
543+
static PyObject *PyRendererAgg_clear(PyRendererAgg *self, PyObject *args)
544544
{
545545
CALL_CPP("clear", self->x->clear());
546546

547547
Py_RETURN_NONE;
548548
}
549549

550-
static PyObject *PyRendererAgg_copy_from_bbox(PyRendererAgg *self, PyObject *args, PyObject *kwds)
550+
static PyObject *PyRendererAgg_copy_from_bbox(PyRendererAgg *self, PyObject *args)
551551
{
552552
agg::rect_d bbox;
553553
BufferRegion *reg;
@@ -565,7 +565,7 @@ static PyObject *PyRendererAgg_copy_from_bbox(PyRendererAgg *self, PyObject *arg
565565
return regobj;
566566
}
567567

568-
static PyObject *PyRendererAgg_restore_region(PyRendererAgg *self, PyObject *args, PyObject *kwds)
568+
static PyObject *PyRendererAgg_restore_region(PyRendererAgg *self, PyObject *args)
569569
{
570570
PyBufferRegion *regobj;
571571
int xx1 = 0, yy1 = 0, xx2 = 0, yy2 = 0, x = 0, y = 0;

src/_contour_wrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const char* PyQuadContourGenerator_create_contour__doc__ =
8181
"--\n\n"
8282
"Create and return a non-filled contour.";
8383

84-
static PyObject* PyQuadContourGenerator_create_contour(PyQuadContourGenerator* self, PyObject* args, PyObject* kwds)
84+
static PyObject* PyQuadContourGenerator_create_contour(PyQuadContourGenerator* self, PyObject* args)
8585
{
8686
double level;
8787
if (!PyArg_ParseTuple(args, "d:create_contour", &level)) {
@@ -98,7 +98,7 @@ const char* PyQuadContourGenerator_create_filled_contour__doc__ =
9898
"--\n\n"
9999
"Create and return a filled contour";
100100

101-
static PyObject* PyQuadContourGenerator_create_filled_contour(PyQuadContourGenerator* self, PyObject* args, PyObject* kwds)
101+
static PyObject* PyQuadContourGenerator_create_filled_contour(PyQuadContourGenerator* self, PyObject* args)
102102
{
103103
double lower_level, upper_level;
104104
if (!PyArg_ParseTuple(args, "dd:create_filled_contour",

src/_path_wrapper.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const char *Py_point_in_path__doc__ =
3232
"point_in_path(x, y, radius, path, trans)\n"
3333
"--\n\n";
3434

35-
static PyObject *Py_point_in_path(PyObject *self, PyObject *args, PyObject *kwds)
35+
static PyObject *Py_point_in_path(PyObject *self, PyObject *args)
3636
{
3737
double x, y, r;
3838
py::PathIterator path;
@@ -64,7 +64,7 @@ const char *Py_points_in_path__doc__ =
6464
"points_in_path(points, radius, path, trans)\n"
6565
"--\n\n";
6666

67-
static PyObject *Py_points_in_path(PyObject *self, PyObject *args, PyObject *kwds)
67+
static PyObject *Py_points_in_path(PyObject *self, PyObject *args)
6868
{
6969
numpy::array_view<const double, 2> points;
7070
double r;
@@ -95,7 +95,7 @@ const char *Py_point_on_path__doc__ =
9595
"point_on_path(x, y, radius, path, trans)\n"
9696
"--\n\n";
9797

98-
static PyObject *Py_point_on_path(PyObject *self, PyObject *args, PyObject *kwds)
98+
static PyObject *Py_point_on_path(PyObject *self, PyObject *args)
9999
{
100100
double x, y, r;
101101
py::PathIterator path;
@@ -127,7 +127,7 @@ const char *Py_points_on_path__doc__ =
127127
"points_on_path(points, radius, path, trans)\n"
128128
"--\n\n";
129129

130-
static PyObject *Py_points_on_path(PyObject *self, PyObject *args, PyObject *kwds)
130+
static PyObject *Py_points_on_path(PyObject *self, PyObject *args)
131131
{
132132
numpy::array_view<const double, 2> points;
133133
double r;
@@ -158,7 +158,7 @@ const char *Py_get_path_extents__doc__ =
158158
"get_path_extents(path, trans)\n"
159159
"--\n\n";
160160

161-
static PyObject *Py_get_path_extents(PyObject *self, PyObject *args, PyObject *kwds)
161+
static PyObject *Py_get_path_extents(PyObject *self, PyObject *args)
162162
{
163163
py::PathIterator path;
164164
agg::trans_affine trans;
@@ -187,7 +187,7 @@ const char *Py_update_path_extents__doc__ =
187187
"update_path_extents(path, trans, rect, minpos, ignore)\n"
188188
"--\n\n";
189189

190-
static PyObject *Py_update_path_extents(PyObject *self, PyObject *args, PyObject *kwds)
190+
static PyObject *Py_update_path_extents(PyObject *self, PyObject *args)
191191
{
192192
py::PathIterator path;
193193
agg::trans_affine trans;
@@ -266,7 +266,7 @@ const char *Py_get_path_collection_extents__doc__ =
266266
"master_transform, paths, transforms, offsets, offset_transform)\n"
267267
"--\n\n";
268268

269-
static PyObject *Py_get_path_collection_extents(PyObject *self, PyObject *args, PyObject *kwds)
269+
static PyObject *Py_get_path_collection_extents(PyObject *self, PyObject *args)
270270
{
271271
agg::trans_affine master_transform;
272272
py::PathGenerator paths;
@@ -315,7 +315,7 @@ const char *Py_point_in_path_collection__doc__ =
315315
"offset_trans, filled)\n"
316316
"--\n\n";
317317

318-
static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyObject *kwds)
318+
static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args)
319319
{
320320
double x, y, radius;
321321
agg::trans_affine master_transform;
@@ -370,7 +370,7 @@ const char *Py_path_in_path__doc__ =
370370
"path_in_path(path_a, trans_a, path_b, trans_b)\n"
371371
"--\n\n";
372372

373-
static PyObject *Py_path_in_path(PyObject *self, PyObject *args, PyObject *kwds)
373+
static PyObject *Py_path_in_path(PyObject *self, PyObject *args)
374374
{
375375
py::PathIterator a;
376376
agg::trans_affine atrans;
@@ -404,7 +404,7 @@ const char *Py_clip_path_to_rect__doc__ =
404404
"clip_path_to_rect(path, rect, inside)\n"
405405
"--\n\n";
406406

407-
static PyObject *Py_clip_path_to_rect(PyObject *self, PyObject *args, PyObject *kwds)
407+
static PyObject *Py_clip_path_to_rect(PyObject *self, PyObject *args)
408408
{
409409
py::PathIterator path;
410410
agg::rect_d rect;
@@ -431,7 +431,7 @@ const char *Py_affine_transform__doc__ =
431431
"affine_transform(points, trans)\n"
432432
"--\n\n";
433433

434-
static PyObject *Py_affine_transform(PyObject *self, PyObject *args, PyObject *kwds)
434+
static PyObject *Py_affine_transform(PyObject *self, PyObject *args)
435435
{
436436
PyObject *vertices_obj;
437437
agg::trans_affine trans;
@@ -472,7 +472,7 @@ const char *Py_count_bboxes_overlapping_bbox__doc__ =
472472
"count_bboxes_overlapping_bbox(bbox, bboxes)\n"
473473
"--\n\n";
474474

475-
static PyObject *Py_count_bboxes_overlapping_bbox(PyObject *self, PyObject *args, PyObject *kwds)
475+
static PyObject *Py_count_bboxes_overlapping_bbox(PyObject *self, PyObject *args)
476476
{
477477
agg::rect_d bbox;
478478
numpy::array_view<const double, 3> bboxes;
@@ -614,7 +614,7 @@ const char *Py_cleanup_path__doc__ =
614614
"return_curves, sketch)\n"
615615
"--\n\n";
616616

617-
static PyObject *Py_cleanup_path(PyObject *self, PyObject *args, PyObject *kwds)
617+
static PyObject *Py_cleanup_path(PyObject *self, PyObject *args)
618618
{
619619
py::PathIterator path;
620620
agg::trans_affine trans;
@@ -721,7 +721,7 @@ const char *Py_convert_to_string__doc__ =
721721
" Whether the opcode comes after the values (True) or before (False).\n"
722722
;
723723

724-
static PyObject *Py_convert_to_string(PyObject *self, PyObject *args, PyObject *kwds)
724+
static PyObject *Py_convert_to_string(PyObject *self, PyObject *args)
725725
{
726726
py::PathIterator path;
727727
agg::trans_affine trans;

0 commit comments

Comments
 (0)
0