Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Fix another offset-argument bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tych0 committed Apr 15, 2012
1 parent a3982d2 commit 91961c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xcb/protobj.py
Expand Up @@ -13,7 +13,8 @@ class Union(xcb.Protobj):

class Request(xcb.Protobj):
def __init__(self, buffer, opcode, void, checked):
xcb.Protobj.__init__(self, buffer)
# buffer is always generated from a StringIO, so the offset is always 0
xcb.Protobj.__init__(self, buffer, 0)
self.opcode = opcode
self.is_void = void
self.is_checked = checked
Expand All @@ -38,7 +39,7 @@ def __init__(self, parent, offset):

class Error(Response):
"""XCB generic error object"""
def __init__(self, parent):
Response.__init__(self, parent)
def __init__(self, parent, offset):
Response.__init__(self, parent, offset)
# self is a xcb_generic_error_t
(self.code, ) = struct.unpack_from('xB', self)

0 comments on commit 91961c2

Please sign in to comment.