python: Fix compile error

This commit is contained in:
Tatsuhiro Tsujikawa 2014-04-05 19:16:40 +09:00
parent c2bb9c01a6
commit c9f3de5f6b
2 changed files with 8 additions and 3 deletions

View File

@ -199,9 +199,13 @@ cdef extern from 'nghttp2/nghttp2.h':
int fd int fd
void *ptr void *ptr
ctypedef enum nghttp2_data_flag:
NGHTTP2_DATA_FLAG_NONE
NGHTTP2_DATA_FLAG_EOF
ctypedef ssize_t (*nghttp2_data_source_read_callback)\ ctypedef ssize_t (*nghttp2_data_source_read_callback)\
(nghttp2_session *session, int32_t stream_id, (nghttp2_session *session, int32_t stream_id,
uint8_t *buf, size_t length, int *eof, uint8_t *buf, size_t length, uint32_t *data_flags,
nghttp2_data_source *source, void *user_data) nghttp2_data_source *source, void *user_data)
ctypedef struct nghttp2_data_provider: ctypedef struct nghttp2_data_provider:

View File

@ -468,7 +468,8 @@ cdef int server_on_stream_close(cnghttp2.nghttp2_session *session,
cdef ssize_t server_data_source_read(cnghttp2.nghttp2_session *session, cdef ssize_t server_data_source_read(cnghttp2.nghttp2_session *session,
int32_t stream_id, int32_t stream_id,
uint8_t *buf, size_t length, int *eof, uint8_t *buf, size_t length,
uint32_t *data_flags,
cnghttp2.nghttp2_data_source *source, cnghttp2.nghttp2_data_source *source,
void *user_data): void *user_data):
cdef http2 = <_HTTP2SessionCore>user_data cdef http2 = <_HTTP2SessionCore>user_data
@ -485,7 +486,7 @@ cdef ssize_t server_data_source_read(cnghttp2.nghttp2_session *session,
memcpy(buf, <uint8_t*>data, nread) memcpy(buf, <uint8_t*>data, nread)
return nread return nread
eof[0] = 1 data_flags[0] = cnghttp2.NGHTTP2_DATA_FLAG_EOF
return 0 return 0