tags 482260 + patch
thanks

Patch attached.

Regards,

 Ruben
--- pyspi-0.6.1.orig/pyspi.pyx
+++ pyspi-0.6.1/pyspi.pyx
@@ -25,9 +25,15 @@
 cdef class Event (EventBase)
 cdef class DeviceEvent
 
-ctypedef enum bool:
+ctypedef unsigned int bool
+
+import __builtin__
+try:
+	False = __builtin__.False
+	True = __builtin__.True
+except AttributeError:
 	False = 0
-	True
+	True = 1
 
 # SPIExceptionCode values:
 (SPI_EXCEPTION_UNSPECIFIED, SPI_EXCEPTION_DISCONNECT, SPI_EXCEPTION_NO_IMPL, SPI_EXCEPTION_IO, SPI_EXCEPTION_BAD_DATA)=range(5) 
@@ -731,7 +737,7 @@
 	Wrapper around the low-level cspi.AccessibleComponent_ functions,
 	giving an OO-style API.
 	"""
-	def getExtents (self, type=0):
+	def getExtents (self, key_type=0):
 		"""
 		Wraps cspi.AccessibleComponent_getExtents, returning an
 		(x,y,w,h) tuple.
@@ -741,7 +747,7 @@
 		cspi.AccessibleComponent_getExtents (self.__item, &x, &y, &w, &h, type)
 		return (x, y, w, h)
 
-	def getPosition (self, type = 0):
+	def getPosition (self, key_type=0):
 		"""
 		Wraps cspi.AccessibleComponent_getPosition, returning an
 		(x,y) tuple.
@@ -991,11 +997,11 @@
 		Wraps cspi.AccessibleHyperlink_getObject
 		"""
 		self.__checkSelf ()
-		cdef Accessible object
-		object = Accessible ()
-		object.__setItem (cspi.AccessibleHyperlink_getObject (self.__item, i))
-		object.__checkSelf ()
-		return object
+		cdef Accessible obj
+		obj = Accessible ()
+		obj.__setItem (cspi.AccessibleHyperlink_getObject (self.__item, i))
+		obj.__checkSelf ()
+		return obj
 
 	def getURI (self, i):
 		"""
@@ -1032,7 +1038,7 @@
 		cspi.AccessibleImage_getImageSize(self.__item, &w, &h);
 		return [w, h]
 
-	def getImagePosition (self, type=0):
+	def getImagePosition (self, key_type=0):
 		"""
 		Wraps cspi.AccessibleImage_getImagePosition, returning a (x,y)
 		pair
@@ -1042,7 +1048,7 @@
 		cspi.AccessibleImage_getImagePosition(self.__item, &x, &y, type)
 		return [x, y]
 
-	def getImageExtents (self, type=0):
+	def getImageExtents (self, key_type=0):
 		"""
 		Wraps cspi.AccessibleImage_getImageExtents, returning a
 		(x,y,w,h) tuple
@@ -1551,7 +1557,7 @@
 	cdef cspi.AccessibleDeviceListener *__item
 	cdef public object modMasks
 
-	def __init__ (self, callback, eventMask = cspi.SPI_KEY_PRESSED | cspi.SPI_KEY_RELEASED):
+	def __init__ (self, callback, eventMask = <int> cspi.SPI_KEY_PRESSED | <int> cspi.SPI_KEY_RELEASED):
 		"""
 		Registers a python callback function to be called.
 

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

Reply via email to