Commit 4cf92028 authored by Denis Bilenko's avatar Denis Bilenko

fix gcc warning

parent d6fa203d
...@@ -9,6 +9,9 @@ EVHTTP_REQ_DELETE = 4 ...@@ -9,6 +9,9 @@ EVHTTP_REQ_DELETE = 4
HTTP_method2name = { 0: 'GET', 1: 'POST', 2: 'HEAD', 3: 'PUT', 4: 'DELETE' } HTTP_method2name = { 0: 'GET', 1: 'POST', 2: 'HEAD', 3: 'PUT', 4: 'DELETE' }
cdef extern from *:
ctypedef char* const_char_ptr "const char*"
cdef extern from "libevent.h": cdef extern from "libevent.h":
ctypedef unsigned short ev_uint16_t ctypedef unsigned short ev_uint16_t
...@@ -329,14 +332,14 @@ cdef class http_request: ...@@ -329,14 +332,14 @@ cdef class http_request:
def find_input_header(self, char* key): def find_input_header(self, char* key):
if not self.__obj: if not self.__obj:
raise HttpRequestDeleted raise HttpRequestDeleted
cdef char* val = evhttp_find_header(self.__obj.input_headers, key) cdef const_char_ptr val = evhttp_find_header(self.__obj.input_headers, key)
if val: if val:
return val return val
def find_output_header(self, char* key): def find_output_header(self, char* key):
if not self.__obj: if not self.__obj:
raise HttpRequestDeleted raise HttpRequestDeleted
cdef char* val = evhttp_find_header(self.__obj.output_headers, key) cdef const_char_ptr val = evhttp_find_header(self.__obj.output_headers, key)
if val: if val:
return val return val
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment