/usr/lib/python3/dist-packages/xcffib/bigreq.py is in python3-xcffib 0.5.1-1build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import xcffib
import struct
import six
MAJOR_VERSION = 0
MINOR_VERSION = 0
key = xcffib.ExtensionKey("BIG-REQUESTS")
_events = {}
_errors = {}
class EnableReply(xcffib.Reply):
def __init__(self, unpacker):
if isinstance(unpacker, xcffib.Protobj):
unpacker = xcffib.MemoryUnpacker(unpacker.pack())
xcffib.Reply.__init__(self, unpacker)
base = unpacker.offset
self.maximum_request_length, = unpacker.unpack("xx2x4xI")
self.bufsize = unpacker.offset - base
class EnableCookie(xcffib.Cookie):
reply_type = EnableReply
class bigreqExtension(xcffib.Extension):
def Enable(self, is_checked=True):
buf = six.BytesIO()
buf.write(struct.pack("=xx2x"))
return self.send_request(0, buf, EnableCookie, is_checked=is_checked)
xcffib._add_ext(key, bigreqExtension, _events, _errors)
|