Skip to content

Commit 5087676

Browse files
committed
use AC converter for PyUnicode_FSDecoder
1 parent 74eaa33 commit 5087676

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

Modules/clinic/symtablemodule.c.h

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/symtablemodule.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module _symtable
1313
_symtable.symtable
1414
1515
source: object
16-
filename: object(converter='PyUnicode_FSDecoder')
16+
filename: unicode_fs_decoded
1717
startstr: str
1818
/
1919
@@ -23,7 +23,7 @@ Return symbol and scope dictionaries used internally by compiler.
2323
static PyObject *
2424
_symtable_symtable_impl(PyObject *module, PyObject *source,
2525
PyObject *filename, const char *startstr)
26-
/*[clinic end generated code: output=59eb0d5fc7285ac4 input=9dd8a50c0c36a4d7]*/
26+
/*[clinic end generated code: output=59eb0d5fc7285ac4 input=436ffff90d02e4f6]*/
2727
{
2828
struct symtable *st;
2929
PyObject *t;
@@ -47,12 +47,10 @@ _symtable_symtable_impl(PyObject *module, PyObject *source,
4747
else {
4848
PyErr_SetString(PyExc_ValueError,
4949
"symtable() arg 3 must be 'exec' or 'eval' or 'single'");
50-
Py_DECREF(filename);
5150
Py_XDECREF(source_copy);
5251
return NULL;
5352
}
5453
st = _Py_SymtableStringObjectFlags(str, filename, start, &cf);
55-
Py_DECREF(filename);
5654
Py_XDECREF(source_copy);
5755
if (st == NULL) {
5856
return NULL;

Python/bltinmodule.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ builtin_chr(PyObject *module, PyObject *i)
745745
compile as builtin_compile
746746
747747
source: object
748-
filename: object(converter="PyUnicode_FSDecoder")
748+
filename: unicode_fs_decoded
749749
mode: str
750750
flags: int = 0
751751
dont_inherit: bool = False
@@ -771,7 +771,7 @@ static PyObject *
771771
builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
772772
const char *mode, int flags, int dont_inherit,
773773
int optimize, int feature_version)
774-
/*[clinic end generated code: output=b0c09c84f116d3d7 input=cc78e20e7c7682ba]*/
774+
/*[clinic end generated code: output=b0c09c84f116d3d7 input=8f0069edbdac381b]*/
775775
{
776776
PyObject *source_copy;
777777
const char *str;
@@ -889,7 +889,6 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
889889
error:
890890
result = NULL;
891891
finally:
892-
Py_DECREF(filename);
893892
return result;
894893
}
895894

Python/clinic/bltinmodule.c.h

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)