Checkpoint. A b it closer to working pickles and pickletools.
Added 'Y' getargs opcode which requires a bytes object.
diff --git a/Python/getargs.c b/Python/getargs.c
index 8331a18..0f6f21b 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1099,6 +1099,15 @@
return converterr("string", arg, msgbuf, bufsize);
break;
}
+
+ case 'Y': { /* bytes object */
+ PyObject **p = va_arg(*p_va, PyObject **);
+ if (PyBytes_Check(arg))
+ *p = arg;
+ else
+ return converterr("bytes", arg, msgbuf, bufsize);
+ break;
+ }
case 'U': { /* Unicode object */
PyObject **p = va_arg(*p_va, PyObject **);
@@ -1640,6 +1649,7 @@
/* object codes */
case 'S': /* string object */
+ case 'Y': /* string object */
case 'U': /* unicode string object */
{
(void) va_arg(*p_va, PyObject **);