add more extension cruft. make extension checking more uniform.

This commit is contained in:
Andrew Gallant (Ocelot)
2012-05-06 17:48:40 -04:00
parent 135cee5761
commit 6d545e723a
7 changed files with 59 additions and 11 deletions

View File

@@ -64,7 +64,7 @@ func (e *Error) ImplementsError(c *Context) {
c.Putln("}")
c.Putln("")
c.Putln("func (err %s) BadId() Id {", e.ErrType())
if c.protocol.Name == "xproto" {
if !c.protocol.isExt() {
c.Putln("return Id(err.BadValue)")
} else {
c.Putln("return 0")