chiark / gitweb /
*.c: Reformat docstrings.
[catacomb-python] / ec.c
diff --git a/ec.c b/ec.c
index 9034c5e2159382fc190eb2ca2b48876ed213dc84..edf6ed64ba24638033963c4e3d5f4e23cf21df10 100644 (file)
--- a/ec.c
+++ b/ec.c
@@ -640,9 +640,9 @@ static PyTypeObject ecpt_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"ECPt([X, [Y]]): elliptic curve points, not associated with any curve.\n\
-  X alone may be None, an existing point, a string 'X, Y', an\n\
-  x-coordinate, or a pair (X, Y); X and Y should be a coordinate pair.",
+  "ECPt([X, [Y]]): elliptic curve points, not associated with any curve.\n"
+  "  X alone may be None, an existing point, a string 'X, Y', an\n"
+  "  x-coordinate, or a pair (X, Y); X and Y should be a coordinate pair.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -757,7 +757,7 @@ static PyTypeObject ecptcurve_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Elliptic curve points; abstract base class for points on given curves.",
+  "Elliptic curve points; abstract base class for points on given curves.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1063,8 +1063,7 @@ static PyGetSetDef eccurve_pygetset[] = {
 
 static PyMethodDef eccurve_pymethods[] = {
 #define METHNAME(name) ecmeth_##name
-  METH (mmul,          "\
-E.mmul([(P0, N0), (P1, N1), ...]) = N0 P0 + N1 P1 + ...")
+  METH (mmul,     "E.mmul([(P0, N0), (P1, N1), ...]) = N0 P0 + N1 P1 + ...")
   METH (find,          "E.find(X) -> P")
   KWMETH(rand,         "E.rand([rng = rand]) -> P")
 #undef METHNAME
@@ -1096,7 +1095,7 @@ static PyTypeObject eccurve_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"An elliptic curve.  Abstract class.",
+  "An elliptic curve.  Abstract class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1150,8 +1149,8 @@ static PyTypeObject ecprimecurve_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"ECPrimeCurve(FIELD, A, B): an elliptic curve over a prime field.\n\
-  Use ECPrimeProjCurve instead.",
+  "ECPrimeCurve(FIELD, A, B): an elliptic curve over a prime field.\n"
+  "  Use ECPrimeProjCurve instead.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1205,8 +1204,8 @@ static PyTypeObject ecprimeprojcurve_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"ECPrimeProjCurve(FIELD, A, B): an elliptic curve over a prime field\n\
-  using projective coordinates.",
+  "ECPrimeProjCurve(FIELD, A, B): an elliptic curve over a prime field\n"
+  "  using projective coordinates.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1260,8 +1259,8 @@ static PyTypeObject ecbincurve_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"ECBinCurve(FIELD, A, B): an elliptic curve over a binary field.\n\
-  Use ECBinProjCurve instead.",
+  "ECBinCurve(FIELD, A, B): an elliptic curve over a binary field.\n"
+  "  Use ECBinProjCurve instead.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1315,8 +1314,8 @@ static PyTypeObject ecbinprojcurve_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"ECBinProjCurve(FIELD, A, B): an elliptic curve over a binary field,\n\
-  using projective coordinates.",
+  "ECBinProjCurve(FIELD, A, B): an elliptic curve over a binary field,\n"
+  "  using projective coordinates.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1521,7 +1520,7 @@ static PyTypeObject ecinfo_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"ECInfo(CURVE, G, R, H): elliptic curve domain parameters.",
+  "ECInfo(CURVE, G, R, H): elliptic curve domain parameters.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1548,13 +1547,13 @@ static PyTypeObject ecinfo_pytype_skel = {
 
 static PyMethodDef methods[] = {
 #define METHNAME(func) meth_##func
-  METH (_ECPt_frombuf,         "frombuf(E, STR) -> (P, REST)")
-  METH (_ECPtCurve_fromraw,    "fromraw(E, STR) -> (P, REST)")
-  KWMETH(_ECPtCurve_os2ecp,    "os2ecp(E, STR, [flags = ...]) -> (P, REST)")
-  METH (_ECPt_parse,           "parse(E, STR) -> (P, REST)")
-  METH (_ECCurve_parse,        "parse(STR) -> (E, REST)")
-  METH (_ECInfo_parse,         "parse(STR) -> (I, REST)")
-  METH (_ECInfo__curven,       "_curven(N) -> I")
+  METH (_ECPt_frombuf, "frombuf(E, STR) -> (P, REST)")
+  METH (_ECPtCurve_fromraw, "fromraw(E, STR) -> (P, REST)")
+  KWMETH(_ECPtCurve_os2ecp, "os2ecp(E, STR, [flags = ...]) -> (P, REST)")
+  METH (_ECPt_parse,   "parse(E, STR) -> (P, REST)")
+  METH (_ECCurve_parse, "parse(STR) -> (E, REST)")
+  METH (_ECInfo_parse, "parse(STR) -> (I, REST)")
+  METH (_ECInfo__curven, "_curven(N) -> I")
 #undef METHNAME
   { 0 }
 };