summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81100dc)
raw | patch | inline | side by side (parent: 81100dc)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 7 Dec 2009 14:39:43 +0000 (15:39 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 7 Dec 2009 14:39:43 +0000 (15:39 +0100) |
For some weird reason `int' is only 4 bytes long on x86_64, so casting
`void *' to `int' results in compiler warnings / errors.
`void *' to `int' results in compiler warnings / errors.
src/pyvalues.c | patch | blob | history |
diff --git a/src/pyvalues.c b/src/pyvalues.c
index 9542a40b07e6feae448747296e52309bcdc4c53c..da7c21d3e29e95b43134ca2abbb0697c20c0e644 100644 (file)
--- a/src/pyvalues.c
+++ b/src/pyvalues.c
};
static PyObject *PluginData_getstring(PyObject *self, void *data) {
- const char *value = ((char *) self) + (int) data;
+ const char *value = ((char *) self) + (intptr_t) data;
return PyString_FromString(value);
}
}
new = PyString_AsString(value);
if (new == NULL) return -1;
- old = ((char *) self) + (int) data;
+ old = ((char *) self) + (intptr_t) data;
sstrncpy(old, new, DATA_MAX_NAME_LEN);
return 0;
}
return -1;
}
- old = ((char *) self) + (int) data;
+ old = ((char *) self) + (intptr_t) data;
sstrncpy(old, new, DATA_MAX_NAME_LEN);
return 0;
}
@@ -677,7 +677,7 @@ static int Notification_setstring(PyObject *self, PyObject *value, void *data) {
}
new = PyString_AsString(value);
if (new == NULL) return -1;
- old = ((char *) self) + (int) data;
+ old = ((char *) self) + (intptr_t) data;
sstrncpy(old, new, NOTIF_MAX_MSG_LEN);
return 0;
}