aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/xgbgen')
-rw-r--r--nexgb/xgbgen/context.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/nexgb/xgbgen/context.go b/nexgb/xgbgen/context.go
index 579c480..32dee58 100644
--- a/nexgb/xgbgen/context.go
+++ b/nexgb/xgbgen/context.go
@@ -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 {")