GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-111178: fix UBSan failures for `PyStdPrinter_Object` (#131607) · python/cpython@27f81e8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Objects
    • fileobject.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Objects/fileobject.c‎

Copy file name to clipboardExpand all lines: Objects/fileobject.c
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,27 +404,27 @@ static PyMethodDef stdprinter_methods[] = {
404404
};
405405

406406
static PyObject *
407-
get_closed(PyStdPrinter_Object *self, void *closure)
407+
get_closed(PyObject *self, void *Py_UNUSED(closure))
408408
{
409409
Py_RETURN_FALSE;
410410
}
411411

412412
static PyObject *
413-
get_mode(PyStdPrinter_Object *self, void *closure)
413+
get_mode(PyObject *self, void *Py_UNUSED(closure))
414414
{
415415
return PyUnicode_FromString("w");
416416
}
417417

418418
static PyObject *
419-
get_encoding(PyStdPrinter_Object *self, void *closure)
419+
get_encoding(PyObject *self, void *Py_UNUSED(closure))
420420
{
421421
Py_RETURN_NONE;
422422
}
423423

424424
static PyGetSetDef stdprinter_getsetlist[] = {
425-
{"closed", (getter)get_closed, NULL, "True if the file is closed"},
426-
{"encoding", (getter)get_encoding, NULL, "Encoding of the file"},
427-
{"mode", (getter)get_mode, NULL, "String giving the file mode"},
425+
{"closed", get_closed, NULL, "True if the file is closed"},
426+
{"encoding", get_encoding, NULL, "Encoding of the file"},
427+
{"mode", get_mode, NULL, "String giving the file mode"},
428428
{0},
429429
};
430430

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.