From c9f3de5f6b374fedaefb27913529f47fff706b8a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 5 Apr 2014 19:16:40 +0900 Subject: [PATCH] python: Fix compile error --- python/cnghttp2.pxd | 6 +++++- python/nghttp2.pyx | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/python/cnghttp2.pxd b/python/cnghttp2.pxd index 9252d4c8..0005f258 100644 --- a/python/cnghttp2.pxd +++ b/python/cnghttp2.pxd @@ -199,9 +199,13 @@ cdef extern from 'nghttp2/nghttp2.h': int fd void *ptr + ctypedef enum nghttp2_data_flag: + NGHTTP2_DATA_FLAG_NONE + NGHTTP2_DATA_FLAG_EOF + ctypedef ssize_t (*nghttp2_data_source_read_callback)\ (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) ctypedef struct nghttp2_data_provider: diff --git a/python/nghttp2.pyx b/python/nghttp2.pyx index 441e84b1..671cf556 100644 --- a/python/nghttp2.pyx +++ b/python/nghttp2.pyx @@ -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, 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, void *user_data): cdef http2 = <_HTTP2SessionCore>user_data @@ -485,7 +486,7 @@ cdef ssize_t server_data_source_read(cnghttp2.nghttp2_session *session, memcpy(buf, data, nread) return nread - eof[0] = 1 + data_flags[0] = cnghttp2.NGHTTP2_DATA_FLAG_EOF return 0