Permalink
Browse files

Fixed 64-bit compilation

  • Loading branch information...
1 parent 14d5310 commit 1ef7c1ed44f5661c36e448bbb5cd6923b19e0f06 @jonashaag committed Jul 26, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 Makefile
  2. +3 −3 bjoern/wsgi.c
View
@@ -100,4 +100,4 @@ upload:
python2 setup.py sdist upload
$(HTTP_PARSER_OBJ):
- $(MAKE) -C $(HTTP_PARSER_DIR) http_parser.o OPT_DEBUG_EXTRA=-fPIC OPT_FAST_EXTRA=-fPIC
+ $(MAKE) -C $(HTTP_PARSER_DIR) http_parser.o CFLAGS_DEBUG_EXTRA=-fPIC CFLAGS_FAST_EXTRA=-fPIC
View
@@ -188,7 +188,7 @@ inspect_headers(Request* request)
err:
TYPE_ERROR_INNER("start_response argument 2", "a list of 2-tuples",
- "(found invalid '%.200s' object at position %d)", Py_TYPE(tuple)->tp_name, i);
+ "(found invalid '%.200s' object at position %zd)", Py_TYPE(tuple)->tp_name, i);
return false;
}
@@ -368,8 +368,8 @@ wrap_http_chunk_cruft_around(PyObject* chunk)
* but hexadecimal representation for chunk lengths btw!?! Fuck W3C */
size_t chunklen = PyString_GET_SIZE(chunk);
assert(chunklen);
- char buf[strlen("ffffffffffffffff") + 2];
- size_t n = sprintf(buf, "%x\r\n", chunklen);
+ char buf[strlen("ffffffff") + 2];
+ size_t n = sprintf(buf, "%x\r\n", (unsigned int)chunklen);
PyObject* new_chunk = PyString_FromStringAndSize(NULL, n + chunklen + 2);
char* new_chunk_p = PyString_AS_STRING(new_chunk);
memcpy(new_chunk_p, buf, n);

0 comments on commit 1ef7c1e

Please sign in to comment.