GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [C API] Add PyBytesWriter API · Issue #121710 · python/cpython Closed as not planned Labels DescriptionFeature or enhancementI propose adding a new API: typedef struct PyBytesWriter PyBytesWriter; // Create a bytes writer instance. // On success, set *str and return a new writer. // On error, set an exception and return NULLL. PyAPI_FUNC(PyBytesWriter*) PyBytesWriter_Create( Py_ssize_t size, char **str); // Return the final Python bytes object and destroy the writer instance. // On success, return a bytes object. // On error, set an exception and return NULL. PyAPI_FUNC(PyObject *) PyBytesWriter_Finish( PyBytesWriter *writer, char *str); // Disard a writer: deallocate its memory. PyAPI_FUNC(void) PyBytesWriter_Discard(PyBytesWriter *writer); // Allocate 'size' bytes to prepare writing into writer. // On success, return 0. // On error, set an exception and return -1. PyAPI_FUNC(int) PyBytesWriter_Prepare( PyBytesWriter *writer, char **str, Py_ssize_t size); // Write a bytes string into writer. // On success, return 0. // On error, set an exception and return -1. PyAPI_FUNC(int) PyBytesWriter_WriteBytes( PyBytesWriter *writer, char **str, const void *bytes, Py_ssize_t size); The The implementation is based on the existing private Linked PRsReacted by Tomas R. and Nadeshiko Manju Activity
MetadataMetadataAssigneesLabelsProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |