Skip to content

Commit 1d96329

Browse files
use unsigned int for version_tag
1 parent 28bdf4c commit 1d96329

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Include/internal/pycore_typecache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ struct type_cache_entry {
2323
// see _PyTypeCache_Lookup().
2424
struct type_cache {
2525
uint32_t mask; // mask for indexing into hashtable, i.e. size of hashtable is mask + 1
26-
uint32_t version_tag; // initialized from type->tp_version_tag
2726
uint32_t available; // number of available entries in hashtable
2827
uint32_t used; // number of used entries in hashtable
28+
unsigned int version_tag; // initialized from type->tp_version_tag
2929
struct type_cache_entry hashtable[_Py_TYPECACHE_MINSIZE]; // hashtable entries
3030
};
3131

3232
struct _PyTypeCacheLookupResult {
3333
_PyStackRef value; // value is a stack reference to the cached attribute or method, or NULL if not found
3434
int cache_hit; // 1 if the cache entry is valid and matches the type's version tag, 0 otherwise
35-
uint32_t version_tag; // version tag of the type when the value was cached
35+
unsigned int version_tag; // version tag of the type when the value was cached
3636
};
3737

3838

0 commit comments

Comments
 (0)