[Python-modules-commits] [python-udatetime] 01/01: Import python-udatetime_0.0.12.orig.tar.gz

Ilias Tsitsimpis iliastsi-guest at moszumanska.debian.org
Thu Aug 3 16:50:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

iliastsi-guest pushed a commit to branch upstream
in repository python-udatetime.

commit 3c87a48a34973547fff234b76daa1091c32df144
Author: Ilias Tsitsimpis <iliastsi at debian.org>
Date:   Fri Jul 21 18:28:31 2017 +0300

    Import python-udatetime_0.0.12.orig.tar.gz
---
 PKG-INFO                       |  2 +-
 bla.py                         |  7 +++++++
 src/rfc3339.c                  | 12 ++++++++----
 udatetime.egg-info/PKG-INFO    |  2 +-
 udatetime.egg-info/SOURCES.txt |  1 +
 version.txt                    |  2 +-
 6 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index 39c2bfd..6fb031e 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: udatetime
-Version: 0.0.11
+Version: 0.0.12
 Summary: Fast RFC3339 compliant date-time library
 Home-page: https://github.com/freach/udatetime
 Author: Simon Pirschel
diff --git a/bla.py b/bla.py
new file mode 100644
index 0000000..8c04535
--- /dev/null
+++ b/bla.py
@@ -0,0 +1,7 @@
+import udatetime
+from time import sleep
+
+while True:
+    a = udatetime.now()
+    # sleep(10)
+    # print(a)
diff --git a/src/rfc3339.c b/src/rfc3339.c
index fe3263e..e637c4f 100644
--- a/src/rfc3339.c
+++ b/src/rfc3339.c
@@ -13,7 +13,7 @@
 #include <time.h>
 
 
-#define RFC3339_VERSION "0.0.6"
+#define RFC3339_VERSION "0.0.12"
 #define DAY_IN_SECS 86400
 #define HOUR_IN_SECS 3600
 #define MINUTE_IN_SECS 60
@@ -672,9 +672,11 @@ static PyTypeObject FixedOffset_type = {
 static PyObject *new_fixed_offset_ex(int offset, PyTypeObject *type) {
     FixedOffset *self = (FixedOffset *) (type->tp_alloc(type, 0));
 
-    if (self != NULL)
-        self->offset = offset;
+    if (self == NULL) {
+        return NULL;
+    }
 
+    self->offset = offset;
     return (PyObject *) self;
 }
 
@@ -682,6 +684,7 @@ static PyObject *new_fixed_offset_ex(int offset, PyTypeObject *type) {
 
 static PyObject *dtstruct_to_datetime_obj(date_time_struct *dt) {
     if ((*dt).ok == 1) {
+        PyObject *offset = new_fixed_offset((*dt).time.offset);
         PyObject *new_datetime = PyDateTimeAPI->DateTime_FromDateAndTime(
             (*dt).date.year,
             (*dt).date.month,
@@ -690,10 +693,11 @@ static PyObject *dtstruct_to_datetime_obj(date_time_struct *dt) {
             (*dt).time.minute,
             (*dt).time.second,
             (*dt).time.fraction,
-            new_fixed_offset((*dt).time.offset),
+            offset,
             PyDateTimeAPI->DateTimeType
         );
 
+        Py_DECREF(offset);
         if (PyErr_Occurred())
             return NULL;
 
diff --git a/udatetime.egg-info/PKG-INFO b/udatetime.egg-info/PKG-INFO
index 39c2bfd..6fb031e 100644
--- a/udatetime.egg-info/PKG-INFO
+++ b/udatetime.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: udatetime
-Version: 0.0.11
+Version: 0.0.12
 Summary: Fast RFC3339 compliant date-time library
 Home-page: https://github.com/freach/udatetime
 Author: Simon Pirschel
diff --git a/udatetime.egg-info/SOURCES.txt b/udatetime.egg-info/SOURCES.txt
index 7ed5f90..e7a4304 100644
--- a/udatetime.egg-info/SOURCES.txt
+++ b/udatetime.egg-info/SOURCES.txt
@@ -1,5 +1,6 @@
 MANIFEST.in
 README.md
+bla.py
 requirements.txt
 setup.py
 version.txt
diff --git a/version.txt b/version.txt
index 2cfabea..8cbf02c 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-0.0.11
+0.0.12

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-udatetime.git



More information about the Python-modules-commits mailing list