XCBConnection is an opaque structure, but it could conceivably happen someday that both XCB 1.0 and XCB 2.0 are loaded into the same address space and a connection created by one library gets passed to the other. The dynamic linker can't detect this situation so we should provide our own mechanism for detecting it. An easy approach is to place a version int at the beginning of the structure and store the library's major revision number there. (For the foreseeable future that will be 1.) Then check the version in every public function that directly accesses fields of the connection, or that calls internal functions that do.
Since we're not doing symbol versioning (Bug 6793), this is not needed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.