D7815: sha1dc: initial implementation of Python extension

2020-01-13 Thread durin42 (Augie Fackler)
Closed by commit rHGbde1cd4c99d9: sha1dc: initial implementation of Python extension (authored by durin42). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7815?vs=19188=19198

D7815: sha1dc: initial implementation of Python extension

2020-01-13 Thread durin42 (Augie Fackler)
durin42 marked an inline comment as done. durin42 updated this revision to Diff 19188. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7815?vs=19119=19188 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7815/new/ REVISION

D7815: sha1dc: initial implementation of Python extension

2020-01-13 Thread durin42 (Augie Fackler)
durin42 added a comment. durin42 marked 3 inline comments as done. Good call on tests, I had the return type of `hexdigest()` wrong. Please do let me know if you think of any missing cases here. INLINE COMMENTS > indygreg wrote in cext.c:68 > I'm not super keen on overloading

D7815: sha1dc: initial implementation of Python extension

2020-01-08 Thread indygreg (Gregory Szorc)
indygreg added a comment. This seems mostly good to me. INLINE COMMENTS > cext.c:68 > + if (SHA1DCFinal(hash_out, )) { > + PyErr_SetString(PyExc_OverflowError, > + "sha1 collision attack detected"); I'm not super keen on overloading

D7815: sha1dc: initial implementation of Python extension

2020-01-08 Thread durin42 (Augie Fackler)
durin42 edited the summary of this revision. durin42 retitled this revision from "sha1dc: initial implementation of Python extension (NOT READY)" to "sha1dc: initial implementation of Python extension". durin42 updated this revision to Diff 19119. REPOSITORY rHG Mercurial CHANGES SINCE LAST

D7815: sha1dc: initial implementation of Python extension (NOT READY)

2020-01-08 Thread durin42 (Augie Fackler)
durin42 added inline comments. durin42 marked 4 inline comments as done. INLINE COMMENTS > spectral wrote in cext.c:24 > Nit: "clang-format on" (typo: s/oon/on/) Good catch! > spectral wrote in cext.c:104 > I think you need a {NULL} entry here, or else it's going to walk off the end > of this

D7815: sha1dc: initial implementation of Python extension (NOT READY)

2020-01-08 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 19116. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7815?vs=19115=19116 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7815/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7815

D7815: sha1dc: initial implementation of Python extension (NOT READY)

2020-01-08 Thread durin42 (Augie Fackler)
durin42 edited the summary of this revision. durin42 updated this revision to Diff 19115. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7815?vs=19113=19115 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7815/new/ REVISION

D7815: sha1dc: initial implementation of Python extension (NOT READY)

2020-01-08 Thread spectral (Kyle Lippincott)
spectral added inline comments. INLINE COMMENTS > cext.c:24 > +} pysha1ctx; > +/* clang-format oon */ > + Nit: "clang-format on" (typo: s/oon/on/) > cext.c:104 > + "Return a copy of the hash object."}, > +}; > + I think you need a {NULL} entry here, or else it's going to walk off the end

D7815: sha1dc: initial implementation of Python extension (NOT READY)

2020-01-08 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 19113. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7815?vs=19112=19113 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7815/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7815

D7815: sha1dc: initial implementation of Python extension (NOT READY)

2020-01-08 Thread durin42 (Augie Fackler)
durin42 created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is not yet ready: there's some bug (probably a simple oversight) that causes it to segfault inside PyType_Ready() during import of the module.