File tree 4 files changed +15
-7
lines changed
4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 107
107
# define TEMPLATE_TYPENAME class
108
108
#endif
109
109
110
+
111
+ /* Need to fudge Py_hash_t types for python > 3.2 */
112
+
113
+ #if PY_VERSION_HEX < 0x030200A4
114
+ typedef long Py_hash_t;
115
+ typedef unsigned long Py_uhash_t;
116
+ #endif
117
+
110
118
#endif // __PyCXX_config_hh__
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ namespace Py
83
83
virtual Object rich_compare ( const Object &, int );
84
84
virtual Object repr ();
85
85
virtual Object str ();
86
- virtual long hash ();
86
+ virtual Py_hash_t hash ();
87
87
virtual Object call ( const Object &, const Object & );
88
88
virtual Object iter ();
89
89
virtual PyObject *iternext ();
Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ namespace Py
270
270
return Object ( PyObject_GetItem ( p, *key ), true );
271
271
}
272
272
273
- long hashValue () const
273
+ Py_hash_t hashValue () const
274
274
{
275
275
return PyObject_Hash ( p );
276
276
}
@@ -1159,7 +1159,7 @@ namespace Py
1159
1159
return the_item.getItem ( key );
1160
1160
}
1161
1161
1162
- long hashValue () const
1162
+ Py_hash_t hashValue () const
1163
1163
{
1164
1164
return the_item.hashValue ();
1165
1165
}
@@ -2417,7 +2417,7 @@ namespace Py
2417
2417
return the_item.getItem ( k );
2418
2418
}
2419
2419
2420
- long hashValue () const
2420
+ Py_hash_t hashValue () const
2421
2421
{
2422
2422
return the_item.hashValue ();
2423
2423
}
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ extern "C"
225
225
static PyObject *rich_compare_handler ( PyObject *, PyObject *, int );
226
226
static PyObject *repr_handler ( PyObject * );
227
227
static PyObject *str_handler ( PyObject * );
228
- static long hash_handler ( PyObject * );
228
+ static Py_hash_t hash_handler ( PyObject * );
229
229
static PyObject *call_handler ( PyObject *, PyObject *, PyObject * );
230
230
static PyObject *iter_handler ( PyObject * );
231
231
static PyObject *iternext_handler ( PyObject * );
@@ -714,7 +714,7 @@ extern "C" PyObject *str_handler( PyObject *self )
714
714
}
715
715
}
716
716
717
- extern " C" long hash_handler ( PyObject *self )
717
+ extern " C" Py_hash_t hash_handler ( PyObject *self )
718
718
{
719
719
try
720
720
{
@@ -1191,7 +1191,7 @@ Py::Object PythonExtensionBase::str()
1191
1191
return Py::None ();
1192
1192
}
1193
1193
1194
- long PythonExtensionBase::hash ()
1194
+ Py_hash_t PythonExtensionBase::hash ()
1195
1195
{
1196
1196
missing_method ( hash );
1197
1197
return -1 ; }
You can’t perform that action at this time.
0 commit comments