[Python-checkins] cpython: fix dummy macro

benjamin.peterson python-checkins at python.org
Fri Sep 9 20:46:29 EDT 2016


https://hg.python.org/cpython/rev/640c123f7461
changeset:   103512:640c123f7461
user:        Benjamin Peterson <benjamin at python.org>
date:        Fri Sep 09 17:46:24 2016 -0700
summary:
  fix dummy macro

files:
  Include/pydtrace.h        |  2 +-
  Modules/_datetimemodule.c |  3 ++-
  2 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/Include/pydtrace.h b/Include/pydtrace.h
--- a/Include/pydtrace.h
+++ b/Include/pydtrace.h
@@ -22,7 +22,7 @@
 
 /* Without DTrace, compile to nothing. */
 
-#define PyDTrace_LINE(arg0, arg1, arg2, arg3) do ; while (0)
+#define PyDTrace_LINE(arg0, arg1, arg2) do ; while (0)
 #define PyDTrace_FUNCTION_ENTRY(arg0, arg1, arg2)  do ; while (0)
 #define PyDTrace_FUNCTION_RETURN(arg0, arg1, arg2) do ; while (0)
 #define PyDTrace_GC_START(arg0)               do ; while (0)
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -2841,9 +2841,10 @@
 static Py_hash_t
 date_hash(PyDateTime_Date *self)
 {
-    if (self->hashcode == -1)
+    if (self->hashcode == -1) {
         self->hashcode = generic_hash(
             (unsigned char *)self->data, _PyDateTime_DATE_DATASIZE);
+    }
 
     return self->hashcode;
 }

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list