[libc-commits] [libc] [libc] Implement vasprintf and asprintf (PR #98824)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Mon Jul 29 13:45:54 PDT 2024


================
@@ -22,60 +22,84 @@ namespace LIBC_NAMESPACE_DECL {
 namespace printf_core {
 
 struct WriteBuffer {
+  enum class WriteMode {
+    FILL_BUFF_AND_DROP_OVERFLOW,
+    FLUSH_TO_STREAM,
+    RESIZE_AND_FILL_BUFF,
+  };
   using StreamWriter = int (*)(cpp::string_view, void *);
+  using OverflowWriter = int (WriteBuffer::*)(cpp::string_view);
----------------
michaelrj-google wrote:

the `OverflowWriter` type isn't used anymore.

https://github.com/llvm/llvm-project/pull/98824


More information about the libc-commits mailing list