]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-35373: Fix PyInit_timezone() error handling (GH-10864) 10883/head
authorVictor Stinner <vstinner@redhat.com>
Mon, 3 Dec 2018 23:09:02 +0000 (00:09 +0100)
committerGitHub <noreply@github.com>
Mon, 3 Dec 2018 23:09:02 +0000 (00:09 +0100)
commit5eb78c75128187a36d8e983027632fa51cc2ff4d
treee996df533317d6edf46157bb293b411689d341bf
parente8f9e4785caeef8a68bb7859280e91a4cb424b79
[3.7] bpo-35373: Fix PyInit_timezone() error handling (GH-10864)

* bpo-35373: Fix PyInit_timezone() error handling

PyInit_timezone() now returns -1 at exit if an exception is raised.
Check also explicitly PyUnicode_DecodeLocale() and Py_BuildValue()
errors.

* bpo-35373: Fix PyInit_time() error handling (GH-10865)

* PyInit_time() now returns NULL if an exception is raised.
* Rename PyInit_timezone() to init_timezone(). "PyInit_" prefix is
  a special prefix for function initializing a module.
  init_timezone() doesn't initialize a module and the function is not
  exported.

(cherry picked from commit 3bb150d8148e3cc08418077a58f43e064b9fde61)
Modules/timemodule.c