[Python-checkins] cpython (3.4): Issue #21036: Fix typo in macro name

victor.stinner python-checkins at python.org
Mon Mar 24 22:36:15 CET 2014


http://hg.python.org/cpython/rev/2bbda947a5b3
changeset: 89948:2bbda947a5b3
branch: 3.4
parent: 89946:b4be6a008fa5
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Mar 24 22:34:34 2014 +0100
summary:
 Issue #21036: Fix typo in macro name
_PY_HASHTABLE_ENTRY_DATA => _Py_HASHTABLE_ENTRY_DATA
files:
 Modules/_tracemalloc.c | 2 +-
 Modules/hashtable.c | 4 ++--
 Modules/hashtable.h | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -1052,7 +1052,7 @@
 PyObject *tracemalloc_obj;
 int res;
 
- trace = (trace_t *)_PY_HASHTABLE_ENTRY_DATA(entry);
+ trace = (trace_t *)_Py_HASHTABLE_ENTRY_DATA(entry);
 
 tracemalloc_obj = trace_to_pyobject(trace, get_traces->tracebacks);
 if (tracemalloc_obj == NULL)
diff --git a/Modules/hashtable.c b/Modules/hashtable.c
--- a/Modules/hashtable.c
+++ b/Modules/hashtable.c
@@ -326,7 +326,7 @@
 entry->key_hash = key_hash;
 
 assert(data_size == ht->data_size);
- memcpy(_PY_HASHTABLE_ENTRY_DATA(entry), data, data_size);
+ memcpy(_Py_HASHTABLE_ENTRY_DATA(entry), data, data_size);
 
 _Py_slist_prepend(&ht->buckets[index], (_Py_slist_item_t*)entry);
 ht->entries++;
@@ -504,7 +504,7 @@
 err = 1;
 }
 else {
- data = _PY_HASHTABLE_ENTRY_DATA(entry);
+ data = _Py_HASHTABLE_ENTRY_DATA(entry);
 err = _Py_hashtable_set(dst, entry->key, data, src->data_size);
 }
 if (err) {
diff --git a/Modules/hashtable.h b/Modules/hashtable.h
--- a/Modules/hashtable.h
+++ b/Modules/hashtable.h
@@ -26,16 +26,16 @@
 /* data follows */
 } _Py_hashtable_entry_t;
 
-#define _PY_HASHTABLE_ENTRY_DATA(ENTRY) \
+#define _Py_HASHTABLE_ENTRY_DATA(ENTRY) \
 ((char *)(ENTRY) + sizeof(_Py_hashtable_entry_t))
 
 #define _Py_HASHTABLE_ENTRY_DATA_AS_VOID_P(ENTRY) \
- (*(void **)_PY_HASHTABLE_ENTRY_DATA(ENTRY))
+ (*(void **)_Py_HASHTABLE_ENTRY_DATA(ENTRY))
 
 #define _Py_HASHTABLE_ENTRY_READ_DATA(TABLE, DATA, DATA_SIZE, ENTRY) \
 do { \
 assert((DATA_SIZE) == (TABLE)->data_size); \
- memcpy(DATA, _PY_HASHTABLE_ENTRY_DATA(ENTRY), DATA_SIZE); \
+ memcpy(DATA, _Py_HASHTABLE_ENTRY_DATA(ENTRY), DATA_SIZE); \
 } while (0)
 
 typedef Py_uhash_t (*_Py_hashtable_hash_func) (const void *key);
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /