Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jonashaag/bjoern
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashaag committed Sep 20, 2011
2 parents 65f401f + 1ce7ea4 commit 42e4184
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bjoern/filewrapper.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "filewrapper.h"

static PyObject*
FileWrapper_New(PyObject* self, PyObject* args, PyObject* kwargs)
FileWrapper_New(PyTypeObject* cls, PyObject* args, PyObject* kwargs)
{
PyObject* file;
if(!PyArg_ParseTuple(args, "O:FileWrapper", &file))
Expand Down
6 changes: 3 additions & 3 deletions bjoern/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static bool send_chunk(Request*);
static bool do_sendfile(Request*);
static bool handle_nonzero_errno(Request*);

void server_run(const char* hostaddr, const int port)
void server_run(void)
{
struct ev_loop* mainloop = ev_default_loop(0);

Expand Down Expand Up @@ -131,7 +131,7 @@ ev_io_on_read(struct ev_loop* mainloop, ev_io* watcher, const int events)

Request* request = REQUEST_FROM_WATCHER(watcher);

Py_ssize_t read_bytes = read(
ssize_t read_bytes = read(
request->client_fd,
read_buf,
READ_BUFFER_SIZE
Expand All @@ -152,7 +152,7 @@ ev_io_on_read(struct ev_loop* mainloop, ev_io* watcher, const int events)
goto out;
}

Request_parse(request, read_buf, read_bytes);
Request_parse(request, read_buf, (size_t)read_bytes);

if(request->state.error_code) {
DBG_REQ(request, "Parse error");
Expand Down
2 changes: 1 addition & 1 deletion bjoern/server.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "request.h"

bool server_init(const char* hostaddr, const int port);
void server_run();
void server_run(void);
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
define_macros = [('WANT_SENDFILE', '1'),
('WANT_SIGINT_HANDLING', '1')],
extra_compile_args = ['-std=c99', '-fno-strict-aliasing', '-Wall',
'-Wextra', '-Wno-unused', '-g', '-fPIC']
'-Wextra', '-Wno-unused', '-g', '-fPIC',
'-Wno-missing-field-initializers']
)

setup(
Expand Down

0 comments on commit 42e4184

Please sign in to comment.