Skip to content

Commit

Permalink
Fix up our protobj implementation after merge
Browse files Browse the repository at this point in the history
The merge made offset a visible parameter, so now we need to pass it along.
  • Loading branch information
tych0 committed Mar 23, 2012
1 parent 9e89fbc commit 22fbc11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xcb/protobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def __init__(self, buffer, opcode, void, checked):

class Response(xcb.Protobj):
"""XCB generic response object"""
def __init__(self, parent):
xcb.Protobj.__init__(self, parent)
def __init__(self, parent, offset):
xcb.Protobj.__init__(self, parent, offset)
# self is a xcb_generic_event_t
self.response_type, self.sequence = struct.unpack_from('BxH', self)

Expand All @@ -31,8 +31,8 @@ class Event(Response):

class Reply(Response):
"""XCB generic reply object"""
def __init__(self, parent):
Response.__init__(self, parent)
def __init__(self, parent, offset):
Response.__init__(self, parent, offset)
# self is a xcb_generic_reply_t
(self.length, ) = struct.unpack_from('4xI', self)

Expand Down

0 comments on commit 22fbc11

Please sign in to comment.