Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d9a7352

Browse files
committed
Issue #21036: Fix typo in macro name
_PY_HASHTABLE_ENTRY_DATA => _Py_HASHTABLE_ENTRY_DATA
1 parent df48b97 commit d9a7352

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

Modules/_tracemalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ tracemalloc_get_traces_fill(_Py_hashtable_entry_t *entry, void *user_data)
10521052
PyObject *tracemalloc_obj;
10531053
int res;
10541054

1055-
trace = (trace_t *)_PY_HASHTABLE_ENTRY_DATA(entry);
1055+
trace = (trace_t *)_Py_HASHTABLE_ENTRY_DATA(entry);
10561056

10571057
tracemalloc_obj = trace_to_pyobject(trace, get_traces->tracebacks);
10581058
if (tracemalloc_obj == NULL)

Modules/hashtable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ _Py_hashtable_set(_Py_hashtable_t *ht, const void *key,
326326
entry->key_hash = key_hash;
327327

328328
assert(data_size == ht->data_size);
329-
memcpy(_PY_HASHTABLE_ENTRY_DATA(entry), data, data_size);
329+
memcpy(_Py_HASHTABLE_ENTRY_DATA(entry), data, data_size);
330330

331331
_Py_slist_prepend(&ht->buckets[index], (_Py_slist_item_t*)entry);
332332
ht->entries++;
@@ -504,7 +504,7 @@ _Py_hashtable_copy(_Py_hashtable_t *src)
504504
err = 1;
505505
}
506506
else {
507-
data = _PY_HASHTABLE_ENTRY_DATA(entry);
507+
data = _Py_HASHTABLE_ENTRY_DATA(entry);
508508
err = _Py_hashtable_set(dst, entry->key, data, src->data_size);
509509
}
510510
if (err) {

Modules/hashtable.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ typedef struct {
2626
/* data follows */
2727
} _Py_hashtable_entry_t;
2828

29-
#define _PY_HASHTABLE_ENTRY_DATA(ENTRY) \
29+
#define _Py_HASHTABLE_ENTRY_DATA(ENTRY) \
3030
((char *)(ENTRY) + sizeof(_Py_hashtable_entry_t))
3131

3232
#define _Py_HASHTABLE_ENTRY_DATA_AS_VOID_P(ENTRY) \
33-
(*(void **)_PY_HASHTABLE_ENTRY_DATA(ENTRY))
33+
(*(void **)_Py_HASHTABLE_ENTRY_DATA(ENTRY))
3434

3535
#define _Py_HASHTABLE_ENTRY_READ_DATA(TABLE, DATA, DATA_SIZE, ENTRY) \
3636
do { \
3737
assert((DATA_SIZE) == (TABLE)->data_size); \
38-
memcpy(DATA, _PY_HASHTABLE_ENTRY_DATA(ENTRY), DATA_SIZE); \
38+
memcpy(DATA, _Py_HASHTABLE_ENTRY_DATA(ENTRY), DATA_SIZE); \
3939
} while (0)
4040

4141
typedef Py_uhash_t (*_Py_hashtable_hash_func) (const void *key);

0 commit comments

Comments
 (0)