From 6c8d9670866117e20eabe3a600408d10de3eb181 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Mon, 23 Sep 2024 21:32:10 -0400 Subject: [PATCH] safer by default --- pixmaprecorder.d | 2 +- simpleaudio.d | 4 ++-- terminal.d | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pixmaprecorder.d b/pixmaprecorder.d index 8241d7d..997681e 100644 --- a/pixmaprecorder.d +++ b/pixmaprecorder.d @@ -466,7 +466,7 @@ final class PixmapRecorder : OutputRange!(const(Pixmap)) { This function automatically calls [open|open()] if necessary. ) +/ - void put(const Pixmap frame) { + void put(const Pixmap frame) @trusted { if (!this.isOpen) { this.open(frame.size); } else { diff --git a/simpleaudio.d b/simpleaudio.d index eac7447..9e78ef7 100644 --- a/simpleaudio.d +++ b/simpleaudio.d @@ -2055,7 +2055,7 @@ struct AudioInput { } /// First, set [receiveData], then call this. - void record() { + void record() @system /* FIXME https://issues.dlang.org/show_bug.cgi?id=24782 */ { assert(receiveData !is null); recording = true; @@ -2206,7 +2206,7 @@ struct AudioOutput { shared(bool) playing = false; // considered to be volatile /// Starts playing, loops until stop is called - void play() { + void play() @system /* FIXME https://issues.dlang.org/show_bug.cgi?id=24782 */ { if(handle is null) open(); diff --git a/terminal.d b/terminal.d index 0578971..845f542 100644 --- a/terminal.d +++ b/terminal.d @@ -2763,7 +2763,7 @@ struct RealTimeConsoleInput { It was in Terminal briefly during an undocumented period, but it had to be moved here to have the context needed to send the real time paste event. +/ - void requestPasteFromClipboard() { + void requestPasteFromClipboard() @system { version(Win32Console) { HWND hwndOwner = null; if(OpenClipboard(hwndOwner) == 0)