GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Argument Clinic does not increase NoneType refcount when returning NoneType from a function with no parameters · Issue #95007 · python/cpython Closed Labels topic-argument-clinictype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug report /*[clinic input] function -> NoneType [clinic start generated code]*/ will produce this function: static PyObject * function(PyObject *module, PyObject *Py_UNUSED(ignored)) { return function_impl(module); } while here is a working example of NoneType return converter: /*[clinic input] function -> NoneType a: int / [clinic start generated code]*/ static PyObject * function(PyObject *module, PyObject *arg) { PyObject *return_value = NULL; int a; PyObject *_return_value; a = _PyLong_AsInt(arg); if (a == -1 && PyErr_Occurred()) { goto exit; } _return_value = function_impl(module, a); if (_return_value != Py_None) { goto exit; } return_value = Py_None; Py_INCREF(Py_None); exit: return return_value; } Generation also fails when generating a function with a single It seems like the problem is with Reacted by Shantanu Activity
MetadataMetadataAssigneesLabelstopic-argument-clinictype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — 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. |