no complier warnings
This commit is contained in:
parent
d9ac1d3638
commit
4065f7dc40
2 changed files with 4 additions and 4 deletions
|
@ -323,7 +323,7 @@ else:
|
||||||
libraries = ['telldus-core']
|
libraries = ['telldus-core']
|
||||||
define_macros = []
|
define_macros = []
|
||||||
|
|
||||||
define_macros.extend([('DATA_LENGTH', 20)])
|
define_macros.extend([('DATA_LENGTH', 20), ('CALLBACK_LENGTH', 20)])
|
||||||
|
|
||||||
telldus = Extension(
|
telldus = Extension(
|
||||||
'telldus',
|
'telldus',
|
||||||
|
|
|
@ -23,12 +23,12 @@ typedef struct {
|
||||||
int callbackId;
|
int callbackId;
|
||||||
} callbackInfo;
|
} callbackInfo;
|
||||||
|
|
||||||
static callbackInfo callbackList[20];
|
static callbackInfo callbackList[CALLBACK_LENGTH];
|
||||||
|
|
||||||
void
|
void
|
||||||
addCallback(PyObject *func, int callbackId)
|
addCallback(PyObject *func, int callbackId)
|
||||||
{
|
{
|
||||||
if (callbackLen < 20) {
|
if (callbackLen < CALLBACK_LENGTH) {
|
||||||
callbackList[callbackLen].func = func;
|
callbackList[callbackLen].func = func;
|
||||||
callbackList[callbackLen].callbackId = callbackId;
|
callbackList[callbackLen].callbackId = callbackId;
|
||||||
callbackLen++;
|
callbackLen++;
|
||||||
|
@ -687,7 +687,7 @@ telldus_tdSensorValue(PyObject *self, PyObject *args)
|
||||||
if (!PyArg_ParseTuple(args, "ssll", &protocol, &model, &sensorId, &dataType))
|
if (!PyArg_ParseTuple(args, "ssll", &protocol, &model, &sensorId, &dataType))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
result = tdSensorValue(protocol, model, sensorId, dataType, &value, DATA_LENGTH, ×tamp);
|
result = tdSensorValue(protocol, model, sensorId, dataType, value, DATA_LENGTH, ×tamp);
|
||||||
|
|
||||||
if (result == TELLSTICK_SUCCESS)
|
if (result == TELLSTICK_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue