diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-08-25 17:29:01 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:47 -0300 |
commit | 65d4cf2be4bf6071b03c9ae34368d9cffda597e5 (patch) | |
tree | cfe417f6e5b8f8da40551dc03e6d231f6f34b063 | |
parent | 6e9b7ffd5971d56101a304e3bd9e0a4205637aaf (diff) |
Fix complation warning relative to PyDateTime_IMPORT.
-rw-r--r-- | PySide/QtCore/qdatetime_conversions.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/PySide/QtCore/qdatetime_conversions.h b/PySide/QtCore/qdatetime_conversions.h index 38c0336c3..44cf92c3c 100644 --- a/PySide/QtCore/qdatetime_conversions.h +++ b/PySide/QtCore/qdatetime_conversions.h @@ -1,3 +1,6 @@ +#define PySideDateTime_IMPORT \ + PyDateTimeAPI = (PyDateTime_CAPI*) PyCObject_Import((char*)"datetime", \ + (char*)"datetime_CAPI") namespace Shiboken { inline bool Converter<QDateTime>::checkType(PyObject* pyObj) @@ -16,7 +19,7 @@ inline bool Converter<QDateTime>::isConvertible(PyObject* pyObj) return true; if (!PyDateTimeAPI) - PyDateTime_IMPORT; + PySideDateTime_IMPORT; SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QDateTime >()); return PyDateTime_Check(pyObj) || ObjectType::isExternalConvertible(shiboType, pyObj); @@ -26,7 +29,7 @@ inline bool Converter<QDateTime>::isConvertible(PyObject* pyObj) inline QDateTime Converter<QDateTime>::toCpp(PyObject* pyObj) { if (!PyDateTimeAPI) - PyDateTime_IMPORT; + PySideDateTime_IMPORT; if (pyObj == Py_None) { return QDateTime(); |