mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
ipc: Const correctness
This commit is contained in:
parent
d27044a18d
commit
f1432789ee
|
@ -367,7 +367,7 @@ ipc_handle_swapchain_import(volatile struct ipc_client_state *ics,
|
||||||
const struct xrt_swapchain_create_info *info,
|
const struct xrt_swapchain_create_info *info,
|
||||||
struct ipc_arg_swapchain_from_native *args,
|
struct ipc_arg_swapchain_from_native *args,
|
||||||
uint32_t *out_id,
|
uint32_t *out_id,
|
||||||
xrt_graphics_buffer_handle_t *handles,
|
const xrt_graphics_buffer_handle_t *handles,
|
||||||
uint32_t num_handles)
|
uint32_t num_handles)
|
||||||
{
|
{
|
||||||
xrt_result_t xret = XRT_SUCCESS;
|
xrt_result_t xret = XRT_SUCCESS;
|
||||||
|
|
|
@ -149,6 +149,11 @@ class HandleType:
|
||||||
self.count_arg_type + ' ')
|
self.count_arg_type + ' ')
|
||||||
return (x + y for x, y in zip(types, self.arg_names))
|
return (x + y for x, y in zip(types, self.arg_names))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def const_arg_decls(self):
|
||||||
|
"""Get the const argument declarations for the client proxy."""
|
||||||
|
return ("const {}".format(x) for x in self.arg_decls)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def handler_arg_names(self):
|
def handler_arg_names(self):
|
||||||
"""Get the argument names for the server handler."""
|
"""Get the argument names for the server handler."""
|
||||||
|
@ -185,7 +190,7 @@ class Call:
|
||||||
args = ["struct ipc_connection *ipc_c"]
|
args = ["struct ipc_connection *ipc_c"]
|
||||||
args.extend(arg.get_func_argument_in() for arg in self.in_args)
|
args.extend(arg.get_func_argument_in() for arg in self.in_args)
|
||||||
if self.in_handles:
|
if self.in_handles:
|
||||||
args.extend(self.in_handles.arg_decls)
|
args.extend(self.in_handles.const_arg_decls)
|
||||||
args.extend(arg.get_func_argument_out() for arg in self.out_args)
|
args.extend(arg.get_func_argument_out() for arg in self.out_args)
|
||||||
if self.out_handles:
|
if self.out_handles:
|
||||||
args.extend(self.out_handles.arg_decls)
|
args.extend(self.out_handles.arg_decls)
|
||||||
|
@ -199,7 +204,7 @@ class Call:
|
||||||
if self.out_handles:
|
if self.out_handles:
|
||||||
args.extend(self.out_handles.handler_arg_decls)
|
args.extend(self.out_handles.handler_arg_decls)
|
||||||
if self.in_handles:
|
if self.in_handles:
|
||||||
args.extend(self.in_handles.arg_decls)
|
args.extend(self.in_handles.const_arg_decls)
|
||||||
write_decl(f, 'xrt_result_t', 'ipc_handle_' + self.name, args)
|
write_decl(f, 'xrt_result_t', 'ipc_handle_' + self.name, args)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue