b6fdee8bfc
Consolidated release: the cross-platform Linux port (engine, generators, CLI, REPL, NRT, portable DSP), live ALSA audio + ALSA MIDI + POSIX OSC + portable WAV codec, the GTK4 GUI (LyrebirdUI on the SwiftOpenUI backend), and the Linux live-coding scratchpad (LiveCompile). Apple platforms unchanged; all additive. See RELEASES.md and LINUX_README.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
621 B
Swift
19 lines
621 B
Swift
// StandardError.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import Foundation
|
|
|
|
/// Writes `message` to standard error.
|
|
///
|
|
/// Uses `FileHandle.standardError` rather than the C `stderr` global: on Linux,
|
|
/// Swift 6 flags a direct reference to the imported `stderr` (a mutable global
|
|
/// `var`) as `reference to var 'stderr' is not concurrency-safe`. `FileHandle`
|
|
/// carries no such hazard and is identical across platforms.
|
|
@inline(__always)
|
|
func printError(_ message: String) {
|
|
try? FileHandle.standardError.write(contentsOf: Data(message.utf8))
|
|
}
|