зеркало из https://github.com/mozilla/gecko-dev.git
d16b0d8318
This patch changes the xpidl parser to generate the rust trait code for methods that take or return a cenum value. Previously this would return an error, which means that adding a method that uses cenums to an existing interface could cause rust code that implements that interface to fail to build. The generated methods take or return u8/u16/u32 depending on the width of the enum. While this is not optimal (the parameter could contain values that are not actually part of the enum), this is similar to what we do for nsLoadFlags. In the future it would be nice to generate code that actually checks the values are present in the enum, and to use a typedef instead of a plain unsigned int. Differential Revision: https://phabricator.services.mozilla.com/D51838 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
base | ||
build | ||
components | ||
doc | ||
ds | ||
glue | ||
idl-parser | ||
io | ||
libxpt/xptcall | ||
reflect | ||
rust | ||
string | ||
system | ||
tests | ||
threads | ||
windbgdlg | ||
xpidl | ||
moz.build | ||
xpcom-config.h.in | ||
xpcom-private.h.in |