diff options
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/getargs.c | 2 | ||||
| -rw-r--r-- | Python/marshal.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 4b57153..c3da368 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -828,6 +828,8 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, char *p = va_arg(*p_va, char *); if (PyBytes_Check(arg) && PyBytes_Size(arg) == 1) *p = PyBytes_AS_STRING(arg)[0]; + else if (PyByteArray_Check(arg) && PyByteArray_Size(arg) == 1) + *p = PyByteArray_AS_STRING(arg)[0]; else return converterr("a byte string of length 1", arg, msgbuf, bufsize); break; diff --git a/Python/marshal.c b/Python/marshal.c index 35fcd3a..edf0366 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -57,7 +57,7 @@ typedef struct { int error; /* see WFERR_* values */ int depth; /* If fp == NULL, the following are valid: */ - PyObject * readable; /* Stream-like object being read from */ + PyObject *readable; /* Stream-like object being read from */ PyObject *str; PyObject *current_filename; char *ptr; @@ -467,7 +467,7 @@ typedef WFILE RFILE; /* Same struct with different invariants */ static int r_string(char *s, int n, RFILE *p) { - char * ptr; + char *ptr; int read, left; if (!p->readable) { @@ -566,7 +566,7 @@ r_long(RFILE *p) static PyObject * r_long64(RFILE *p) { - PyObject * result = NULL; + PyObject *result = NULL; long lo4 = r_long(p); long hi4 = r_long(p); |
