Skip to content

Commit 66a2db8

Browse files
committed
Fix parakeet_helper build on Windows/MSVC: rename stdout/stderr params
stdout and stderr are C standard library macros. On macOS/Clang they resolve to extern FILE* variables so using them as parameter names compiles by coincidence. On Windows/MSVC they expand to function calls like (__acrt_iob_func(1)), breaking the syntax. Rename to captured_stdout / captured_stderr. The JSON keys remain 'stdout' and 'stderr' (unchanged wire format).
1 parent b54a81c commit 66a2db8

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

examples/models/parakeet/parakeet_helper_protocol.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,16 @@ std::string encode_status_message(
132132
std::string encode_result_message(
133133
const std::string& request_id,
134134
const std::string& text,
135-
const std::string& stdout,
136-
const std::string& stderr,
135+
const std::string& captured_stdout,
136+
const std::string& captured_stderr,
137137
const std::optional<std::string>& runtime_profile) {
138138
json payload = {
139139
{"type", "result"},
140140
{"version", kProtocolVersion},
141141
{"request_id", request_id},
142142
{"text", text},
143-
{"stdout", stdout},
144-
{"stderr", stderr},
143+
{"stdout", captured_stdout},
144+
{"stderr", captured_stderr},
145145
};
146146
if (runtime_profile.has_value()) {
147147
payload["runtime_profile"] = *runtime_profile;

examples/models/parakeet/parakeet_helper_protocol.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ std::string encode_status_message(
6060
std::string encode_result_message(
6161
const std::string& request_id,
6262
const std::string& text,
63-
const std::string& stdout,
64-
const std::string& stderr,
63+
const std::string& captured_stdout,
64+
const std::string& captured_stderr,
6565
const std::optional<std::string>& runtime_profile);
6666
std::string encode_error_message(
6767
const std::optional<std::string>& request_id,

0 commit comments

Comments
 (0)