diff options
Diffstat (limited to 'cython/imobiledevice.pyx')
| -rw-r--r-- | cython/imobiledevice.pyx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx index b7ec87b..dc0fb88 100644 --- a/cython/imobiledevice.pyx +++ b/cython/imobiledevice.pyx | |||
| @@ -70,10 +70,12 @@ cdef class iDeviceError(BaseError): | |||
| 70 | cpdef set_debug_level(int level): | 70 | cpdef set_debug_level(int level): |
| 71 | idevice_set_debug_level(level) | 71 | idevice_set_debug_level(level) |
| 72 | 72 | ||
| 73 | cdef class iDeviceEvent: pass | 73 | cdef class iDeviceEvent: |
| 74 | def __init__(self, *args, **kwargs): | ||
| 75 | raise TypeError("iDeviceEvent cannot be instantiated") | ||
| 74 | 76 | ||
| 75 | cdef void idevice_event_cb(const_idevice_event_t c_event, void *user_data): | 77 | cdef void idevice_event_cb(const_idevice_event_t c_event, void *user_data): |
| 76 | cdef iDeviceEvent event = iDeviceEvent() | 78 | cdef iDeviceEvent event = iDeviceEvent.__new__(iDeviceEvent) |
| 77 | event._c_event = c_event | 79 | event._c_event = c_event |
| 78 | (<object>user_data)(event) | 80 | (<object>user_data)(event) |
| 79 | 81 | ||
