Skip to content

Commit 35cdedb

Browse files
authored
Restore name to standard_b64encode (#14)
1 parent 69f4d16 commit 35cdedb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Modules/_base64/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl Drop for BorrowedBuffer {
111111
}
112112

113113
#[unsafe(no_mangle)]
114-
pub unsafe extern "C" fn b64encode(
114+
pub unsafe extern "C" fn standard_b64encode(
115115
_module: *mut PyObject,
116116
args: *mut *mut PyObject,
117117
nargs: Py_ssize_t,
@@ -120,7 +120,7 @@ pub unsafe extern "C" fn b64encode(
120120
unsafe {
121121
PyErr_SetString(
122122
PyExc_TypeError,
123-
c"b64encode() takes exactly one argument".as_ptr(),
123+
c"standard_b64encode() takes exactly one argument".as_ptr(),
124124
);
125125
}
126126
return ptr::null_mut();
@@ -137,7 +137,7 @@ pub unsafe extern "C" fn b64encode(
137137
unsafe {
138138
PyErr_SetString(
139139
PyExc_TypeError,
140-
c"b64encode() argument has negative length".as_ptr(),
140+
c"standard_b64encode() argument has negative length".as_ptr(),
141141
);
142142
}
143143
return ptr::null_mut();
@@ -206,9 +206,9 @@ unsafe impl Sync for ModuleDef {}
206206
pub static _BASE64_MODULE_METHODS: [PyMethodDef; 2] = {
207207
[
208208
PyMethodDef {
209-
ml_name: c"b64encode".as_ptr() as *mut c_char,
209+
ml_name: c"standard_b64encode".as_ptr() as *mut c_char,
210210
ml_meth: PyMethodDefFuncPointer {
211-
PyCFunctionFast: b64encode,
211+
PyCFunctionFast: standard_b64encode,
212212
},
213213
ml_flags: METH_FASTCALL,
214214
ml_doc: c"Demo for the _base64 module".as_ptr() as *mut c_char,

0 commit comments

Comments
 (0)