Refactor and clean up str.format() code (and helpers) in advance of optimizations.
diff --git a/Include/bytesobject.h b/Include/bytesobject.h
index 941577a..cb31da8 100644
--- a/Include/bytesobject.h
+++ b/Include/bytesobject.h
@@ -188,6 +188,12 @@
 						  Py_ssize_t *count,
 						  int append_zero_char);
 
+/* Format the object based on the format_spec, as defined in PEP 3101
+   (Advanced String Formatting). */
+PyAPI_FUNC(PyObject *) _PyBytes_FormatAdvanced(PyObject *obj,
+					       char *format_spec,
+					       Py_ssize_t format_spec_len);
+
 #ifdef __cplusplus
 }
 #endif