Sometime in the future, maybe...

int
lericson 2010-05-12 01:20:05 +02:00
parent 374ceed11f
commit 21b49defee
1 changed files with 4 additions and 0 deletions

View File

@ -1738,6 +1738,10 @@ static int _PylibMC_CheckKeyStringAndSize(char *key, Py_ssize_t size) {
PyErr_Format(PyExc_ValueError, "key too long, max is %d",
MEMCACHED_MAX_KEY);
return 0;
#ifdef NO_EMPTY_KEYS /* I wish... */
} else if (size == 0) {
PyErr_Format(PyExc_ValueError, "key cannot be empty");
#endif
}
/* TODO Check key contents here. */