summaryrefslogtreecommitdiffstats
path: root/mpi
diff options
context:
space:
mode:
Diffstat (limited to 'mpi')
-rw-r--r--mpi/mpi.c6
-rw-r--r--mpi/mpi.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/mpi/mpi.c b/mpi/mpi.c
index 198a5a86..d3e4cb05 100644
--- a/mpi/mpi.c
+++ b/mpi/mpi.c
@@ -156,7 +156,7 @@ int s_mp_cmp_d(mp_int *a, mp_digit d); /* magnitude digit compare */
mp_size s_mp_ispow2(mp_int *v); /* is v a power of 2? */
int s_mp_ispow2d(mp_digit d); /* is d a power of 2? */
-int s_mp_tovalue(int ch, int r); /* convert ch to value */
+int s_mp_tovalue(wchar_t ch, int r); /* convert ch to value */
char s_mp_todigit(int val, int r, int low); /* convert val to digit */
size_t s_mp_outlen(mp_size bits, int r); /* output length in bytes */
@@ -2568,7 +2568,7 @@ mp_size mp_is_pow_two(mp_int *mp)
* characters are ignored, and the function reads until a non-digit
* character or the end of the string.
*/
-mp_err mp_read_radix(mp_int *mp, unsigned char *str, int radix)
+mp_err mp_read_radix(mp_int *mp, const wchar_t *str, int radix)
{
size_t ix = 0;
int val = 0;
@@ -3959,7 +3959,7 @@ int s_mp_ispow2d(mp_digit d)
* The results will be odd if you use a radix < 2 or > 62, you are
* expected to know what you're up to.
*/
-int s_mp_tovalue(int ch, int r)
+int s_mp_tovalue(wchar_t ch, int r)
{
int val, xch;
diff --git a/mpi/mpi.h b/mpi/mpi.h
index 8bd469f7..1106abde 100644
--- a/mpi/mpi.h
+++ b/mpi/mpi.h
@@ -189,7 +189,7 @@ mp_size mp_is_pow_two(mp_int *mp);
#define mp_tomag(mp, str) mp_to_unsigned_bin((mp), (str))
#endif
-mp_nign mp_err mp_read_radix(mp_int *mp, unsigned char *str, int radix);
+mp_nign mp_err mp_read_radix(mp_int *mp, const wchar_t *str, int radix);
mp_size mp_radix_size(mp_int *mp, int radix);
mp_size mp_value_radix_size(mp_size num, mp_size qty, int radix);
mp_err mp_toradix(mp_int *mp, unsigned char *str, int radix);