[pypy-commit] pypy py3k: cpyext: add definitions for Py_hash_t

amauryfa noreply at buildbot.pypy.org
Thu Nov 22 23:50:01 CET 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r59053:31835d3f390a
Date: 2012-11-22 22:46 +0100
http://bitbucket.org/pypy/pypy/changeset/31835d3f390a/

Log:	cpyext: add definitions for Py_hash_t

diff --git a/pypy/module/cpyext/include/pyport.h b/pypy/module/cpyext/include/pyport.h
--- a/pypy/module/cpyext/include/pyport.h
+++ b/pypy/module/cpyext/include/pyport.h
@@ -28,6 +28,11 @@
 #endif
 #endif /* HAVE_LONG_LONG */
 
+/* Py_hash_t is the same size as a pointer. */
+typedef Py_ssize_t Py_hash_t;
+/* Py_uhash_t is the unsigned equivalent needed to calculate numeric hash. */
+typedef size_t Py_uhash_t;
+
 /* Largest possible value of size_t.
    SIZE_MAX is part of C99, so it might be defined on some
    platforms. If it is not defined, (size_t)-1 is a portable


More information about the pypy-commit mailing list