Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b30f271

Browse files
committed
Try to fix weird assertion error on the Fedora buildbot.
1 parent d01d396 commit b30f271

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Python/marshal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ typedef struct {
8383
else w_more(c, p)
8484

8585
static void
86-
w_more(int c, WFILE *p)
86+
w_more(char c, WFILE *p)
8787
{
8888
Py_ssize_t size, newsize;
8989
if (p->str == NULL)
@@ -100,7 +100,7 @@ w_more(int c, WFILE *p)
100100
p->ptr = PyBytes_AS_STRING((PyBytesObject *)p->str) + size;
101101
p->end =
102102
PyBytes_AS_STRING((PyBytesObject *)p->str) + newsize;
103-
*p->ptr++ = Py_SAFE_DOWNCAST(c, int, char);
103+
*p->ptr++ = c;
104104
}
105105
}
106106

@@ -159,7 +159,7 @@ w_pstring(const char *s, Py_ssize_t n, WFILE *p)
159159
static void
160160
w_short_pstring(const char *s, Py_ssize_t n, WFILE *p)
161161
{
162-
w_byte(n, p);
162+
w_byte(Py_SAFE_DOWNCAST(n, Py_ssize_t, unsigned char), p);
163163
w_string(s, n, p);
164164
}
165165

0 commit comments

Comments
 (0)