EC_OUT(ECPT_C(me), &p, ECPT_P(me));
ec_putraw(ECPT_C(me), &b, &p);
EC_DESTROY(&p);
- xfree(q);
h = unihash_hash(&unihash_global, h, BBASE(&b), BLEN(&b));
+ xfree(q);
return (h % LONG_MAX);
}
PyObject *rc = 0;
if (EC_ATINF(ECPT_P(me))) VALERR("point at infinity");
getecptout(&p, me);
- if (mp_tolong_checked(p.x, &l)) goto end;
- rc = PyInt_FromLong(l);
+ if (!mp_tolong_checked(p.x, &l, 0)) rc = PyInt_FromLong(l);
+ else rc = mp_topylong(p.x);
end:
EC_DESTROY(&p);
return (rc);