chiark
/
gitweb
/
~mdw
/
catacomb-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use ValueError instead of SyntaxError throughout.
[catacomb-python]
/
ec.c
diff --git
a/ec.c
b/ec.c
index d27036eed9c478136bf0fd35d0a9b82490edf07b..13b7798592601d2c174e42d1c7a56a2adc4200c7 100644
(file)
--- a/
ec.c
+++ b/
ec.c
@@
-436,7
+436,7
@@
static int ecptxl_1(ec_curve *c, ec *p, PyObject *x)
qd.p = q;
qd.e = 0;
if (!ec_ptparse(&qd, p))
qd.p = q;
qd.e = 0;
if (!ec_ptparse(&qd, p))
-
SYN
ERR(qd.e);
+
VAL
ERR(qd.e);
goto fix;
} else if (c && (xx = tomp(x)) != 0) {
xx = F_IN(c->f, xx, xx);
goto fix;
} else if (c && (xx = tomp(x)) != 0) {
xx = F_IN(c->f, xx, xx);
@@
-817,7
+817,7
@@
static PyObject *meth__ECPtCurve_fromraw(PyObject *me, PyObject *arg)
buf_init(&b, p, len);
cc = ECCURVE_C(me);
if (ec_getraw(cc, &b, &pp))
buf_init(&b, p, len);
cc = ECCURVE_C(me);
if (ec_getraw(cc, &b, &pp))
-
SYN
ERR("bad point");
+
VAL
ERR("bad point");
EC_IN(cc, &pp, &pp);
rc = Py_BuildValue("(NN)", ecpt_pywrap(me, &pp), bytestring_pywrapbuf(&b));
end:
EC_IN(cc, &pp, &pp);
rc = Py_BuildValue("(NN)", ecpt_pywrap(me, &pp), bytestring_pywrapbuf(&b));
end:
@@
-851,7
+851,7
@@
static PyObject *meth__ECPt_parse(PyObject *me, PyObject *arg)
if (!PyArg_ParseTuple(arg, "Os:parse", &me, &p)) goto end;
qd.p = p;
qd.e = 0;
if (!PyArg_ParseTuple(arg, "Os:parse", &me, &p)) goto end;
qd.p = p;
qd.e = 0;
- if (!ec_ptparse(&qd, &pp))
SYN
ERR(qd.e);
+ if (!ec_ptparse(&qd, &pp))
VAL
ERR(qd.e);
rc = Py_BuildValue("(Ns)", ecpt_pywrapout(me, &pp), qd.p);
end:
return (rc);
rc = Py_BuildValue("(Ns)", ecpt_pywrapout(me, &pp), qd.p);
end:
return (rc);
@@
-975,7
+975,7
@@
static PyObject *meth__ECCurve_parse(PyObject *me, PyObject *arg)
qd.p = p;
qd.e = 0;
if ((c = ec_curveparse(&qd)) == 0)
qd.p = p;
qd.e = 0;
if ((c = ec_curveparse(&qd)) == 0)
-
SYN
ERR(qd.e);
+
VAL
ERR(qd.e);
rc = eccurve_pywrap(0, c);
end:
return (rc);
rc = eccurve_pywrap(0, c);
end:
return (rc);
@@
-1355,7
+1355,7
@@
static PyObject *meth__ECInfo_parse(PyObject *me, PyObject *arg)
qd.p = p;
qd.e = 0;
if (ec_infoparse(&qd, &ei))
qd.p = p;
qd.e = 0;
if (ec_infoparse(&qd, &ei))
-
SYN
ERR(qd.e);
+
VAL
ERR(qd.e);
rc = Py_BuildValue("(Ns)", ecinfo_pywrap(&ei), qd.p);
end:
return (rc);
rc = Py_BuildValue("(Ns)", ecinfo_pywrap(&ei), qd.p);
end:
return (rc);