]> granicus.if.org Git - python/commit
type_call() now detect bugs in type new and init
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 3 Sep 2015 10:16:49 +0000 (12:16 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 3 Sep 2015 10:16:49 +0000 (12:16 +0200)
commit99bb14bf0c4b9bdef2535710cc14abbdf5aa648a
tree2183ba90650d4ffe68fc1a3f3caa9c1f6b801f1a
parent31eb5fbe895169256784d4eccdcbf799c945e272
type_call() now detect bugs in type new and init

* Call _Py_CheckFunctionResult() to check for bugs in type
  constructors (tp_new)
* Add assertions to ensure an exception was raised if tp_init failed
  or that no exception was raised if tp_init succeed

Refactor also the function to have less indentation.
Objects/typeobject.c