Projet

Général

Profil

0001-python-does-not-decref-boolean-constants-57268.patch

Benjamin Dauvergne, 27 septembre 2021 14:16

Télécharger (967 octets)

Voir les différences:

Subject: [PATCH] python: does not decref boolean constants (#57268)

 bindings/python/lang.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
bindings/python/lang.py
728 728
            else:
729 729
                print_('E: unknown constant type: %r' % c[0], file=sys.stderr)
730 730
            print_('    PyDict_SetItemString(d, "%s", obj);' % c[1][6:], file=fd)
731
            print_('    Py_DECREF(obj);', file=fd)
731
            if c[0] != 'b':  # refcount of Py_True/False should not be changed
732
                print_('    Py_DECREF(obj);', file=fd)
732 733
        print_('}', file=fd)
733 734
        print_('', file=fd)
734 735

  
735
-