Bug 905542: IsNull/SetNull functions for nullable unions should have bodyInHeader=True to prevent compiler warnings r=Ms2ger

This commit is contained in:
David Zbarsky 2013-08-23 13:56:20 -04:00
parent 4aae58c4bb
commit e7c81e9306

View File

@ -6097,9 +6097,11 @@ class CGUnionStruct(CGThing):
if self.type.hasNullableType:
enumValues.append("eNull")
methods.append(ClassMethod("IsNull", "bool", [], const=True, inline=True,
body="return mType == eNull;"))
body="return mType == eNull;",
bodyInHeader=True))
methods.append(ClassMethod("SetNull", "void", [], inline=True,
body="mType = eNull;"))
body="mType = eNull;",
bodyInHeader=True))
destructorCases.append(CGCase("eNull", None))
toJSValCases.append(CGCase("eNull", CGGeneric("rval.setNull();\n"
"return true;")))