Merged revisions 76822,76824 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76822 | benjamin.peterson | 2009-12-13 15:21:43 -0600 (Sun, 13 Dec 2009) | 1 line

  initialize to NULL
........
  r76824 | benjamin.peterson | 2009-12-13 15:27:53 -0600 (Sun, 13 Dec 2009) | 1 line

  add a test of loading the datetime capi
........
This commit is contained in:
Benjamin Peterson 2009-12-13 21:30:54 +00:00
parent 5f4ec0451c
commit 91d58bd146
2 changed files with 17 additions and 1 deletions

View file

@ -182,7 +182,7 @@ typedef struct {
#else
/* Define global variable for the C API and a macro for setting it. */
static PyDateTime_CAPI *PyDateTimeAPI;
static PyDateTime_CAPI *PyDateTimeAPI = NULL;
#define PyDateTime_IMPORT \
PyDateTimeAPI = (PyDateTime_CAPI *)PyCapsule_Import(PyDateTime_CAPSULE_NAME, 0)