diff options
author | Thorsten Behrens <sbehrens@gmx.li> | 2010-12-29 05:29:08 -0500 |
---|---|---|
committer | Thorsten Behrens <sbehrens@gmx.li> | 2010-12-29 05:29:08 -0500 |
commit | ca701f92f538ddd61835a2ec252ebbb8a0b1e4de (patch) | |
tree | 7f328bedc0a41e5430bcb70bc535e6069d99e276 /src/_fastmath.c | |
parent | baa9119a1448368d618fb2977b47a5c59a389533 (diff) | |
download | pycrypto-ca701f92f538ddd61835a2ec252ebbb8a0b1e4de.tar.gz |
PY3K support for _fastmath.c; removed floordiv(a,b) hack and replaced with divmod(a,b)[0]; move to assertEqual throughout the test suite to prep for assert_ and failIf being removed in 3.3/3.4
Diffstat (limited to 'src/_fastmath.c')
-rwxr-xr-x | src/_fastmath.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/_fastmath.c b/src/_fastmath.c index 4656181..f3922cf 100755 --- a/src/_fastmath.c +++ b/src/_fastmath.c @@ -380,7 +380,7 @@ static PyTypeObject dsaKeyType = { 0, /* call */ #ifdef IS_PY3K 0, /*tp_str*/ - dsaKey_getattro, /*tp_getattro*/ + (getattrofunc) dsaKey_getattro, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT, /*tp_flags*/ @@ -402,12 +402,13 @@ static PyTypeObject rsaKeyType = { PyObject_HEAD_INIT (NULL) 0, /*ob_size*/ #endif - "rsaKey", - sizeof (rsaKey), - 0, + "rsaKey", /*tp_name*/ + sizeof (rsaKey), /*tp_size*/ + 0, /*tp_itemsize*/ + /* methods */ (destructor) rsaKey_dealloc, /* dealloc */ 0, /* print */ -#ifdef IS_PY3k +#ifdef IS_PY3K 0, /* getattr */ #else (getattrfunc) rsaKey_getattr, /* getattr */ @@ -422,7 +423,7 @@ static PyTypeObject rsaKeyType = { 0, /* call */ #ifdef IS_PY3K 0, /*tp_str*/ - rsaKey_getattro, /*tp_getattro*/ + (getattrofunc) rsaKey_getattro, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT, /*tp_flags*/ @@ -477,7 +478,7 @@ dsaKey_dealloc (dsaKey * key) static PyObject * #ifdef IS_PY3K -dsaKey_getattr (dsaKey * key, PyObject *attr) +dsaKey_getattro (dsaKey * key, PyObject *attr) #else dsaKey_getattr (dsaKey * key, char *attr) #endif |