Skip to content

Commit

Permalink
symbol: add signed casting
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Feb 4, 2022
1 parent 4f459eb commit f887e8e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/pyzshell/pyzshell/symbol.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ctypes
import os
import struct
import time
Expand Down Expand Up @@ -110,6 +111,21 @@ def tell(self):
""" Construct compliance. """
return self + self._offset

@property
def c_int64(self):
""" cast to c_int64 """
return ctypes.c_int64(self).value

@property
def c_int32(self):
""" cast to c_int32 """
return ctypes.c_int32(self).value

@property
def c_int16(self):
""" cast to c_int16 """
return ctypes.c_int16(self).value

def __add__(self, other):
try:
return self._client.symbol(int(self) + other)
Expand Down

0 comments on commit f887e8e

Please sign in to comment.