@@ -73,6 +73,32 @@ Cookie IONAME(BeginInternalArrayFormattedInput)(const Descriptor &descriptor,
73
73
formatLength, scratchArea, scratchBytes, sourceFile, sourceLine);
74
74
}
75
75
76
+ template <Direction DIR>
77
+ Cookie BeginInternalListIO (
78
+ std::conditional_t <DIR == Direction::Input, const char , char > *internal,
79
+ std::size_t internalLength, void ** /* scratchArea*/ ,
80
+ std::size_t /* scratchBytes*/ , const char *sourceFile, int sourceLine) {
81
+ Terminator oom{sourceFile, sourceLine};
82
+ return &New<InternalListIoStatementState<DIR>>{oom}(
83
+ internal, internalLength, sourceFile, sourceLine)
84
+ .release ()
85
+ ->ioStatementState ();
86
+ }
87
+
88
+ Cookie IONAME (BeginInternalListOutput)(char *internal,
89
+ std::size_t internalLength, void **scratchArea, std::size_t scratchBytes,
90
+ const char *sourceFile, int sourceLine) {
91
+ return BeginInternalListIO<Direction::Output>(internal, internalLength,
92
+ scratchArea, scratchBytes, sourceFile, sourceLine);
93
+ }
94
+
95
+ Cookie IONAME (BeginInternalListInput)(const char *internal,
96
+ std::size_t internalLength, void **scratchArea, std::size_t scratchBytes,
97
+ const char *sourceFile, int sourceLine) {
98
+ return BeginInternalListIO<Direction::Input>(internal, internalLength,
99
+ scratchArea, scratchBytes, sourceFile, sourceLine);
100
+ }
101
+
76
102
template <Direction DIR>
77
103
Cookie BeginInternalFormattedIO (
78
104
std::conditional_t <DIR == Direction::Input, const char , char > *internal,
@@ -90,7 +116,6 @@ Cookie IONAME(BeginInternalFormattedOutput)(char *internal,
90
116
std::size_t internalLength, const char *format, std::size_t formatLength,
91
117
void **scratchArea, std::size_t scratchBytes, const char *sourceFile,
92
118
int sourceLine) {
93
- Terminator oom{sourceFile, sourceLine};
94
119
return BeginInternalFormattedIO<Direction::Output>(internal, internalLength,
95
120
format, formatLength, scratchArea, scratchBytes, sourceFile, sourceLine);
96
121
}
@@ -99,7 +124,6 @@ Cookie IONAME(BeginInternalFormattedInput)(const char *internal,
99
124
std::size_t internalLength, const char *format, std::size_t formatLength,
100
125
void **scratchArea, std::size_t scratchBytes, const char *sourceFile,
101
126
int sourceLine) {
102
- Terminator oom{sourceFile, sourceLine};
103
127
return BeginInternalFormattedIO<Direction::Input>(internal, internalLength,
104
128
format, formatLength, scratchArea, scratchBytes, sourceFile, sourceLine);
105
129
}
0 commit comments