Commit e621d8cc authored by Jim Fulton's avatar Jim Fulton

Python 3

parent c0c8f88b
......@@ -21,12 +21,17 @@ _get_max_size(BTree *self, PyObject *name, long default_max)
PyObject *size;
long isize;
size = PyObject_GetAttr(OBJECT(self->ob_type), name);
size = PyObject_GetAttr(OBJECT(OBJECT(self)->ob_type), name);
if (size == NULL) {
PyErr_Clear();
return default_max;
}
#ifdef PY3K
isize = PyLong_AsLong(size);
#else
isize = PyInt_AsLong(size);
#endif
Py_DECREF(size);
if (isize <= 0 && ! PyErr_Occurred()) {
PyErr_SetString(PyExc_ValueError,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment