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']
|
||||
define_macros = []
|
||||
|
||||
define_macros.extend([('DATA_LENGTH', 20)])
|
||||
define_macros.extend([('DATA_LENGTH', 20), ('CALLBACK_LENGTH', 20)])
|
||||
|
||||
telldus = Extension(
|
||||
'telldus',
|
||||
|
|
|
@ -23,12 +23,12 @@ typedef struct {
|
|||
int callbackId;
|
||||
} callbackInfo;
|
||||
|
||||
static callbackInfo callbackList[20];
|
||||
static callbackInfo callbackList[CALLBACK_LENGTH];
|
||||
|
||||
void
|
||||
addCallback(PyObject *func, int callbackId)
|
||||
{
|
||||
if (callbackLen < 20) {
|
||||
if (callbackLen < CALLBACK_LENGTH) {
|
||||
callbackList[callbackLen].func = func;
|
||||
callbackList[callbackLen].callbackId = callbackId;
|
||||
callbackLen++;
|
||||
|
@ -687,7 +687,7 @@ telldus_tdSensorValue(PyObject *self, PyObject *args)
|
|||
if (!PyArg_ParseTuple(args, "ssll", &protocol, &model, &sensorId, &dataType))
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue