Skip to content

Commit f9a6691

Browse files
committed
Simplify len implementation
1 parent e6a6207 commit f9a6691

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

mypyc/lib-rt/librt_strings.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ CPyBytesWriter_Write(PyObject *obj, PyObject *value) {
135135

136136
static inline CPyTagged
137137
CPyBytesWriter_Len(PyObject *obj) {
138-
BytesWriterObject *self = (BytesWriterObject *)obj;
139-
return (CPyTagged)self->len << 1;
138+
return (CPyTagged)((BytesWriterObject *)obj)->len << 1;
140139
}
141140

142141
#endif // MYPYC_EXPERIMENTAL

0 commit comments

Comments
 (0)