Set serial on Rust binding

This commit is contained in:
topjohnwu 2023-12-24 04:36:51 +08:00
parent 2dd23b2518
commit 1057cb3e3c

View File

@ -138,9 +138,10 @@ struct prop_to_string : prop_cb {
uint32_t serial; uint32_t serial;
}; };
template<> void prop_to_string<rust::String>::exec(const char *, const char *value, uint32_t) { template<> void prop_to_string<rust::String>::exec(const char *, const char *value, uint32_t s) {
// We do not want to crash when values are not UTF-8 // We do not want to crash when values are not UTF-8
val = rust::String::lossy(value); val = rust::String::lossy(value);
serial = s;
} }
static int set_prop(const char *name, const char *value, PropFlags flags) { static int set_prop(const char *name, const char *value, PropFlags flags) {