Skip to content

Commit 0730fdf

Browse files
committed
Rename internal Base 85 codec functions to match Base 64 helpers
1 parent adb1922 commit 0730fdf

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

Modules/binascii.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,8 @@ binascii_b2a_ascii85_impl(PyObject *module, Py_buffer *data, int foldspaces,
11381138
}
11391139

11401140
static PyObject *
1141-
internal_a2b_base85(PyObject *module, Py_buffer *data,
1142-
const unsigned char table_a2b[], const char *name)
1141+
base85_decode_impl(PyObject *module, Py_buffer *data,
1142+
const unsigned char table_a2b[], const char *name)
11431143
{
11441144
const unsigned char *ascii_data = data->buf;
11451145
Py_ssize_t ascii_len = data->len;
@@ -1216,8 +1216,8 @@ internal_a2b_base85(PyObject *module, Py_buffer *data,
12161216
}
12171217

12181218
static PyObject *
1219-
internal_b2a_base85(PyObject *module, Py_buffer *data, int pad,
1220-
const unsigned char table_b2a[], const char *name)
1219+
base85_encode_impl(PyObject *module, Py_buffer *data, int pad,
1220+
const unsigned char table_b2a[], const char *name)
12211221
{
12221222
const unsigned char *bin_data = data->buf;
12231223
Py_ssize_t bin_len = data->len;
@@ -1297,8 +1297,7 @@ static PyObject *
12971297
binascii_a2b_base85_impl(PyObject *module, Py_buffer *data)
12981298
/*[clinic end generated code: output=c2db6ab9181b0089 input=06c9d595352b5a2b]*/
12991299
{
1300-
return internal_a2b_base85(module, data,
1301-
table_a2b_base85, "Base85");
1300+
return base85_decode_impl(module, data, table_a2b_base85, "Base85");
13021301
}
13031302

13041303
/*[clinic input]
@@ -1317,8 +1316,7 @@ static PyObject *
13171316
binascii_b2a_base85_impl(PyObject *module, Py_buffer *data, int pad)
13181317
/*[clinic end generated code: output=b317adb36a57740d input=89fde81b96dcec06]*/
13191318
{
1320-
return internal_b2a_base85(module, data, pad,
1321-
table_b2a_base85, "Base85");
1319+
return base85_encode_impl(module, data, pad, table_b2a_base85, "Base85");
13221320
}
13231321

13241322
/*[clinic input]
@@ -1334,8 +1332,7 @@ static PyObject *
13341332
binascii_a2b_z85_impl(PyObject *module, Py_buffer *data)
13351333
/*[clinic end generated code: output=57d8260bb5267a98 input=c54baff4d81510a4]*/
13361334
{
1337-
return internal_a2b_base85(module, data,
1338-
table_a2b_base85_z85, "Z85");
1335+
return base85_decode_impl(module, data, table_a2b_base85_z85, "Z85");
13391336
}
13401337

13411338
/*[clinic input]
@@ -1354,8 +1351,7 @@ static PyObject *
13541351
binascii_b2a_z85_impl(PyObject *module, Py_buffer *data, int pad)
13551352
/*[clinic end generated code: output=88284835e332c9cf input=51d070a5a6cf82d8]*/
13561353
{
1357-
return internal_b2a_base85(module, data, pad,
1358-
table_b2a_base85_z85, "Z85");
1354+
return base85_encode_impl(module, data, pad, table_b2a_base85_z85, "Z85");
13591355
}
13601356

13611357
/*[clinic input]

0 commit comments

Comments
 (0)