canvas_base: Allow to specify constant operations

There's no need for the canvas operations to be changed.
This allows without casts to have the operation structures
constants in the code.
This potentially allows to reduce attack surface having some
more data constant instead or read/write.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-11-07 10:57:33 +00:00
parent 72ae9b2971
commit 45e2844845

View File

@ -60,7 +60,7 @@ typedef struct {
} SpiceImageCacheOps;
struct _SpiceImageCache {
SpiceImageCacheOps *ops;
const SpiceImageCacheOps *ops;
};
typedef struct {
@ -69,7 +69,7 @@ typedef struct {
} SpiceImageSurfacesOps;
struct _SpiceImageSurfaces {
SpiceImageSurfacesOps *ops;
const SpiceImageSurfacesOps *ops;
};
typedef struct {