Issue #12 new

In datetime.d, replace Py_None with Py_None()

Ivan Smirnov
created an issue

I would have opened a pull request, but am blocked by a corporate firewall, sorry about that.

I guess you would have to replace Py_None with something like cast(PyObject *) Py_None() in these two strings (I grepped through the other source files and it looks like it's the only occasion), otherwise you get compilation errors about properties:

datetime.d:267:            min, sec, usec, Py_None(), PyDateTimeAPI.DateTimeType);
datetime.d:272:            Py_None(), PyDateTimeAPI.TimeType);

By the way, regarding the comment in the source code where Py_None is defined "issue 8683 gets in the way of this being a property"), could Py_None be made a legit property with this DMD pull request? https://github.com/D-Programming-Language/dmd/pull/2305 https://github.com/D-Programming-Language/phobos/pull/1604

Comments (2)

  1. Log in to comment