From 5d2a3a3f7c4b99ef38d626f6ef023aa1aef457b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Saltvik?= Date: Fri, 10 Aug 2012 23:48:42 +0200 Subject: [PATCH] use tabs --- bindings/python/native/telldus.c | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/bindings/python/native/telldus.c b/bindings/python/native/telldus.c index 017e7883..e559cc7a 100644 --- a/bindings/python/native/telldus.c +++ b/bindings/python/native/telldus.c @@ -4,18 +4,18 @@ #include /* estrdup.c -- duplicate a string, die if error - * - * char *string; - * char *newstring; - * newstring = estrdup(string); - * - * estrdup returns a copy of its argument, located in memory - * allocated from the heap. If it is unable to allocate the - * necessary memory, estrdup executes PyErr_NoMemory(); - * (Generally, the routine error is not expected to return, - * but if it does, estrdup will return NULL.) - */ - + * + * char *string; + * char *newstring; + * newstring = estrdup(string); + * + * estrdup returns a copy of its argument, located in memory + * allocated from the heap. If it is unable to allocate the + * necessary memory, estrdup executes PyErr_NoMemory(); + * (Generally, the routine error is not expected to return, + * but if it does, estrdup will return NULL.) +*/ + int callbackLen = 0; typedef struct { @@ -459,7 +459,7 @@ telldus_tdRegisterDeviceEvent(PyObject *self, PyObject *args) result = tdRegisterDeviceEvent((TDDeviceEvent) &telldus_deviceEventCallback, 0); - addCallback(func, result); + addCallback(func, result); return PyLong_FromLong((long) result); } @@ -513,7 +513,7 @@ telldus_tdRegisterDeviceChangeEvent(PyObject *self, PyObject *args) result = tdRegisterDeviceChangeEvent((TDDeviceChangeEvent) &telldus_deviceChangeEventCallback, 0); - addCallback(func, result); + addCallback(func, result); return PyLong_FromLong((long) result); } @@ -567,7 +567,7 @@ telldus_tdRegisterRawDeviceEvent(PyObject *self, PyObject *args) result = tdRegisterRawDeviceEvent((TDRawDeviceEvent) &telldus_rawDeviceEventCallback, 0); - addCallback(func, result); + addCallback(func, result); return PyLong_FromLong((long) result); } @@ -621,7 +621,7 @@ telldus_tdRegisterSensorEvent(PyObject *self, PyObject *args) result = tdRegisterSensorEvent((TDSensorEvent) &telldus_sensorEventCallback, 0); - addCallback(func, result); + addCallback(func, result); return PyLong_FromLong((long) result); } @@ -631,11 +631,11 @@ telldus_tdUnregisterCallback(PyObject *self, PyObject *args) { long id; PyObject *callback; - + if (!PyArg_ParseTuple(args, "l", &id)) return NULL; - if (hasCallback(id) == 1) { + if (hasCallback(id) == 1) { callback = getCallback(id); Py_DECREF(callback); removeCallback(id);