[gtk-vnc] Add g_autoptr API for exported allocated types
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Add g_autoptr API for exported allocated types
- Date: Mon, 12 Sep 2022 12:26:29 +0000 (UTC)
commit 9760dcc1326ebebc72e283fcf478b0ea2fb6c688
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Tue Sep 6 15:40:22 2022 +0400
Add g_autoptr API for exported allocated types
Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
src/vncaudioformat.h | 2 ++
src/vncaudiopulse.h | 2 ++
src/vncaudiosample.h | 2 ++
src/vncbaseaudio.h | 2 ++
src/vncbaseframebuffer.h | 2 +-
src/vnccairoframebuffer.h | 1 +
src/vnccolormap.h | 1 +
src/vncconnection.h | 2 ++
src/vnccursor.h | 2 ++
src/vncdisplay.h | 2 ++
src/vncgrabsequence.h | 2 ++
src/vncpixelformat.h | 2 ++
12 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/src/vncaudioformat.h b/src/vncaudioformat.h
index 3ab8b00..6e01128 100644
--- a/src/vncaudioformat.h
+++ b/src/vncaudioformat.h
@@ -51,6 +51,8 @@ VncAudioFormat *vnc_audio_format_new(void);
VncAudioFormat *vnc_audio_format_copy(VncAudioFormat *format);
void vnc_audio_format_free(VncAudioFormat *format);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncAudioFormat, vnc_audio_format_free)
+
G_END_DECLS
#endif /* VNC_AUDIO_FORMAT_H */
diff --git a/src/vncaudiopulse.h b/src/vncaudiopulse.h
index 422ddea..d67a9d2 100644
--- a/src/vncaudiopulse.h
+++ b/src/vncaudiopulse.h
@@ -57,6 +57,8 @@ GType vnc_audio_pulse_get_type(void) G_GNUC_CONST;
VncAudioPulse *vnc_audio_pulse_new(void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncAudioPulse, g_object_unref)
+
G_END_DECLS
#endif /* VNC_AUDIO_PULSE_H */
diff --git a/src/vncaudiosample.h b/src/vncaudiosample.h
index a4b15ba..1948015 100644
--- a/src/vncaudiosample.h
+++ b/src/vncaudiosample.h
@@ -42,6 +42,8 @@ VncAudioSample *vnc_audio_sample_new(guint32 capacity);
VncAudioSample *vnc_audio_sample_copy(VncAudioSample *sample);
void vnc_audio_sample_free(VncAudioSample *sample);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncAudioSample, vnc_audio_sample_free)
+
G_END_DECLS
#endif /* VNC_AUDIO_SAMPLE_H */
diff --git a/src/vncbaseaudio.h b/src/vncbaseaudio.h
index 8eea93d..2eb1e5a 100644
--- a/src/vncbaseaudio.h
+++ b/src/vncbaseaudio.h
@@ -60,6 +60,8 @@ GType vnc_base_audio_get_type(void) G_GNUC_CONST;
VncBaseAudio *vnc_base_audio_new(void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncBaseAudio, g_object_unref)
+
G_END_DECLS
#endif /* VNC_BASE_AUDIO_H */
diff --git a/src/vncbaseframebuffer.h b/src/vncbaseframebuffer.h
index 0d03bc3..a387cc9 100644
--- a/src/vncbaseframebuffer.h
+++ b/src/vncbaseframebuffer.h
@@ -71,7 +71,7 @@ VncBaseFramebuffer *vnc_base_framebuffer_new(guint8 *buffer,
const VncPixelFormat *localFormat,
const VncPixelFormat *remoteFormat);
-
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncBaseFramebuffer, g_object_unref)
G_END_DECLS
diff --git a/src/vnccairoframebuffer.h b/src/vnccairoframebuffer.h
index 0fe0316..97ae071 100644
--- a/src/vnccairoframebuffer.h
+++ b/src/vnccairoframebuffer.h
@@ -69,6 +69,7 @@ VncCairoFramebuffer *vnc_cairo_framebuffer_new(guint16 width, guint16 height,
cairo_surface_t *vnc_cairo_framebuffer_get_surface(VncCairoFramebuffer *fb);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncCairoFramebuffer, g_object_unref)
G_END_DECLS
diff --git a/src/vnccolormap.h b/src/vnccolormap.h
index 75377c4..fe0544d 100644
--- a/src/vnccolormap.h
+++ b/src/vnccolormap.h
@@ -67,6 +67,7 @@ gboolean vnc_color_map_lookup(VncColorMap *map,
guint16 *green,
guint16 *blue);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncColorMap, vnc_color_map_free)
G_END_DECLS
diff --git a/src/vncconnection.h b/src/vncconnection.h
index 9efbf8f..1fe516d 100644
--- a/src/vncconnection.h
+++ b/src/vncconnection.h
@@ -271,6 +271,8 @@ gboolean vnc_connection_power_control(VncConnection *conn,
VncConnectionResizeStatus vnc_connection_set_size(VncConnection *conn,
guint width, guint height);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncConnection, g_object_unref)
+
G_END_DECLS
#endif /* VNC_CONNECTION_H */
diff --git a/src/vnccursor.h b/src/vnccursor.h
index 6a2f559..baa7107 100644
--- a/src/vnccursor.h
+++ b/src/vnccursor.h
@@ -73,6 +73,8 @@ guint16 vnc_cursor_get_hoty(VncCursor *cursor);
guint16 vnc_cursor_get_width(VncCursor *cursor);
guint16 vnc_cursor_get_height(VncCursor *cursor);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncCursor, g_object_unref)
+
G_END_DECLS
#endif /* VNC_CURSOR_H */
diff --git a/src/vncdisplay.h b/src/vncdisplay.h
index 7d607e9..65ba6b7 100644
--- a/src/vncdisplay.h
+++ b/src/vncdisplay.h
@@ -164,6 +164,8 @@ const GOptionEntry *vnc_display_get_option_entries(void);
gboolean vnc_display_request_update(VncDisplay *obj);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncDisplay, g_object_unref)
+
G_END_DECLS
#endif /* VNC_DISPLAY_H */
diff --git a/src/vncgrabsequence.h b/src/vncgrabsequence.h
index 14aa5e2..f583312 100644
--- a/src/vncgrabsequence.h
+++ b/src/vncgrabsequence.h
@@ -49,6 +49,8 @@ gchar *vnc_grab_sequence_as_string(VncGrabSequence *sequence);
guint vnc_grab_sequence_get_nth(VncGrabSequence *sequence,
guint n);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncGrabSequence, vnc_grab_sequence_free)
+
G_END_DECLS
#endif /* VNC_GRAB_SEQUENCE_H */
diff --git a/src/vncpixelformat.h b/src/vncpixelformat.h
index fa9486d..1d0d167 100644
--- a/src/vncpixelformat.h
+++ b/src/vncpixelformat.h
@@ -55,6 +55,8 @@ void vnc_pixel_format_free(VncPixelFormat *format);
gboolean vnc_pixel_format_match(const VncPixelFormat *format,
const VncPixelFormat *other);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(VncPixelFormat, vnc_pixel_format_free)
+
G_END_DECLS
#endif /* VNC_PIXEL_FORMAT_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]