From 101ceba71773879f065b0a6fe3a6aa1b8a5c1648 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 18 Jun 2010 17:11:39 +0200 Subject: [PATCH] Make cursor data @as_ptr to avoid copying data --- common/messages.h | 3 ++- spice.proto | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/messages.h b/common/messages.h index f6c2aeb..2ba14bf 100644 --- a/common/messages.h +++ b/common/messages.h @@ -173,7 +173,8 @@ typedef struct SpiceMsgcMainMouseModeRequest { typedef struct SpiceCursor { uint32_t flags; SpiceCursorHeader header; - uint8_t data[0]; + uint32_t data_size; + uint8_t *data; } SpiceCursor; typedef struct SpiceMsgDisplayMode { diff --git a/spice.proto b/spice.proto index 093c808..6750d2d 100644 --- a/spice.proto +++ b/spice.proto @@ -867,7 +867,7 @@ struct CursorHeader { struct Cursor { cursor_flags flags; CursorHeader header; - uint8 data[] @end; + uint8 data[] @end @as_ptr(data_size); }; channel CursorChannel : BaseChannel {