]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- For #391: more double casts in python start time calculation.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 8 Jan 2021 08:55:55 +0000 (09:55 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 8 Jan 2021 08:55:55 +0000 (09:55 +0100)
doc/Changelog
pythonmod/interface.i

index c7d09cbb667772bef37f32b3f64cf5fb6045b324..f5861eb983225bc013f79213ff40b30114b6c97d 100644 (file)
@@ -3,6 +3,7 @@
          modules can compute the response time.
        - For #391: use struct timeval* start_time for callback information.
        - For #391: fix indentation.
+       - For #391: more double casts in python start time calculation.
 
 6 January 2021: Wouter
        - Fix #379: zone loading over HTTP appears to have buffer issues.
index 6e629fa70a3b607371703d964193ee3c26351165..5dae04aa404b26d3bec623b10697af587ed04434 100644 (file)
@@ -1548,7 +1548,7 @@ int edns_opt_list_append(struct edns_option** list, uint16_t code, size_t len,
         PyObject *py_rep, *py_repinfo, *py_region;
         PyObject *py_args, *py_kwargs, *result;
         int res = 0;
-        double py_start_time = start_time->tv_sec + start_time->tv_usec / 1e6;
+        double py_start_time = ((double)start_time->tv_sec) + ((double)start_time->tv_usec) / 1.0e6;
 
         PyGILState_STATE gstate = PyGILState_Ensure();
         func = (PyObject *) python_callback;