From 02e026e298c5010b11063730e583f479daf99d7f Mon Sep 17 00:00:00 2001 From: Jah-On <58399643+Jah-On@users.noreply.github.com> Date: Mon, 16 May 2022 05:45:40 +0000 Subject: [PATCH] clipboard: add `[heap]` tag to the Clipboard structs (#14412) --- vlib/clipboard/clipboard_darwin.c.v | 1 + vlib/clipboard/clipboard_windows.c.v | 1 + vlib/clipboard/dummy/dummy_clipboard.v | 1 + vlib/clipboard/x11/clipboard.c.v | 1 + 4 files changed, 4 insertions(+) diff --git a/vlib/clipboard/clipboard_darwin.c.v b/vlib/clipboard/clipboard_darwin.c.v index f22e7320d7..a9e4c7ad08 100644 --- a/vlib/clipboard/clipboard_darwin.c.v +++ b/vlib/clipboard/clipboard_darwin.c.v @@ -8,6 +8,7 @@ module clipboard // Clipboard represents a system clipboard. // // System "copy" and "paste" actions utilize the clipboard for temporary storage. +[heap] pub struct Clipboard { pb voidptr last_cb_serial i64 diff --git a/vlib/clipboard/clipboard_windows.c.v b/vlib/clipboard/clipboard_windows.c.v index 8585feb44b..7e1d05c0eb 100644 --- a/vlib/clipboard/clipboard_windows.c.v +++ b/vlib/clipboard/clipboard_windows.c.v @@ -54,6 +54,7 @@ fn C.DestroyWindow(hwnd C.HWND) // Clipboard represents a system clipboard. // // System "copy" and "paste" actions utilize the clipboard for temporary storage. +[heap] struct Clipboard { max_retries int retry_delay int diff --git a/vlib/clipboard/dummy/dummy_clipboard.v b/vlib/clipboard/dummy/dummy_clipboard.v index 8bfedefe53..452076a38f 100644 --- a/vlib/clipboard/dummy/dummy_clipboard.v +++ b/vlib/clipboard/dummy/dummy_clipboard.v @@ -3,6 +3,7 @@ module dummy // Clipboard represents a system clipboard. // // System "copy" and "paste" actions utilize the clipboard for temporary storage. +[heap] pub struct Clipboard { mut: text string // text data sent or received diff --git a/vlib/clipboard/x11/clipboard.c.v b/vlib/clipboard/x11/clipboard.c.v index 8aacdbf124..7c54111b02 100644 --- a/vlib/clipboard/x11/clipboard.c.v +++ b/vlib/clipboard/x11/clipboard.c.v @@ -138,6 +138,7 @@ enum AtomType { text_html = 9 } +[heap] pub struct Clipboard { display &C.Display mut: