Reputation: 41
print(struct.calcsize("p") * 8)
The above code prints 8 instead of 32 or 64.
Upvotes: 1
Views: 44
Reputation: 889
According to the docs, you're actually looking for struct.calcsize("P")
. Uppercase P is the equivalent of void *
in C.
Upvotes: 1