comparison Python/sysmodule.c @ 65494:e8969fb822fc

make hashes always the size of pointers; introduce Py_hash_t #9778
author Benjamin Peterson <benjamin@python.org>
date Sun, 17 Oct 2010 20:54:53 +0000
parents 932f97bfbdc0
children 0b5bfba7a907
comparison
equal deleted inserted replaced
65493:c147f910af70 65494:e8969fb822fc
565 int field = 0; 565 int field = 0;
566 hash_info = PyStructSequence_New(&Hash_InfoType); 566 hash_info = PyStructSequence_New(&Hash_InfoType);
567 if (hash_info == NULL) 567 if (hash_info == NULL)
568 return NULL; 568 return NULL;
569 PyStructSequence_SET_ITEM(hash_info, field++, 569 PyStructSequence_SET_ITEM(hash_info, field++,
570 PyLong_FromLong(8*sizeof(long))); 570 PyLong_FromLong(8*sizeof(Py_hash_t)));
571 PyStructSequence_SET_ITEM(hash_info, field++, 571 PyStructSequence_SET_ITEM(hash_info, field++,
572 PyLong_FromLong(_PyHASH_MODULUS)); 572 PyLong_FromLong(_PyHASH_MODULUS));
573 PyStructSequence_SET_ITEM(hash_info, field++, 573 PyStructSequence_SET_ITEM(hash_info, field++,
574 PyLong_FromLong(_PyHASH_INF)); 574 PyLong_FromLong(_PyHASH_INF));
575 PyStructSequence_SET_ITEM(hash_info, field++, 575 PyStructSequence_SET_ITEM(hash_info, field++,