nexgb: export {Major,Minor}Version for extensions

This commit is contained in:
2018-09-21 08:37:21 +02:00
parent 1a53c005e9
commit 28a5112532
26 changed files with 131 additions and 0 deletions

View File

@@ -101,6 +101,12 @@ func (c *Context) Morph(xmlBytes []byte) {
if c.protocol.isExt() {
xname := c.protocol.ExtXName
c.Putln("const (")
c.Putln("MajorVersion = %s", c.protocol.MajorVersion)
c.Putln("MinorVersion = %s", c.protocol.MinorVersion)
c.Putln(")")
c.Putln("")
c.Putln("// Init must be called before using the %s extension.",
xname)
c.Putln("func Init(c *xgb.Conn) error {")