Function panda_sys::object_set_props [−][src]
pub unsafe extern "C" fn object_set_props(
obj: *mut Object,
errp: *mut *mut Error,
...
) -> c_int
Expand description
object_set_props: @obj: the object instance to set properties on @errp: pointer to error object @…: list of property names and values
This function will set a list of properties on an existing object instance.
The variadic parameters are a list of pairs of (propname, propvalue) strings. The propname of %NULL indicates the end of the property list.
obj = object_set_props(obj, &err, “share”, “yes”, “mem-path”, “/dev/shm/somefile”, “prealloc”, “yes”, “size”, “1048576”, NULL);
if (!obj) { g_printerr(“Cannot set properties: %s\n”, error_get_pretty(err)); }
The returned object will have one stable reference maintained for as long as it is present in the object hierarchy.
Returns: -1 on error, 0 on success