Skip to content

Instantly share code, notes, and snippets.

@jbergstroem
Created March 13, 2014 07:05
Show Gist options
  • Select an option

  • Save jbergstroem/9523153 to your computer and use it in GitHub Desktop.

Select an option

Save jbergstroem/9523153 to your computer and use it in GitHub Desktop.
fix type warning
diff --git src/_pylibmcmodule.c src/_pylibmcmodule.c
index 98ec2f0..6cae4ef 100644
--- src/_pylibmcmodule.c
+++ src/_pylibmcmodule.c
@@ -2212,7 +2212,7 @@ static int _key_normalized_obj(PyObject **key) {
static int _key_normalized_str(char **str, Py_ssize_t *size) {
/* libmemcached pads max_key_size with one byte for null termination */
if (*size >= MEMCACHED_MAX_KEY) {
- PyErr_Format(PyExc_ValueError, "key length %d too long, max is %d",
+ PyErr_Format(PyExc_ValueError, "key length %zd too long, max is %d",
*size, MEMCACHED_MAX_KEY - 1);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment