chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56e8606
)
field.c: Convert external-format field element to hex/octal.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 23 Oct 2019 22:18:00 +0000
(23:18 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 22 Nov 2019 22:18:10 +0000
(22:18 +0000)
Rather than going through the effort of calculating the external
representation of the field element and then returning the internal
version.
field.c
patch
|
blob
|
blame
|
history
diff --git
a/field.c
b/field.c
index 024c5780967700d49433af7d0c8e58989713c33d..fae03653140d1db5dd984aa8cd311e83a07e8865 100644
(file)
--- a/
field.c
+++ b/
field.c
@@
-274,7
+274,7
@@
static PyObject *fe_pylong(PyObject *x)
#define BASEOP(name, radix, pre) \
static PyObject *fe_py##name(PyObject *x) { \
mp *xx = F_OUT(FE_F(x), MP_NEW, FE_X(x)); \
- PyObject *rc = mp_topystring(
FE_X(x), radix, 0, pre, 0);
\
+ PyObject *rc = mp_topystring(
xx, radix, 0, pre, 0);
\
MP_DROP(xx); \
return (rc); \
}