Added mz_stream_get_interface. #283

This commit is contained in:
Nathan Moinvaziri 2018-07-22 09:06:16 -07:00
parent 4cfdd5dd83
commit 627993ef07
2 changed files with 9 additions and 0 deletions

View File

@ -230,6 +230,14 @@ int32_t mz_stream_set_base(void *stream, void *base)
return MZ_OK;
}
void* mz_stream_get_interface(void *stream)
{
mz_stream *strm = (mz_stream *)stream;
if (strm == NULL || strm->vtbl == NULL)
return NULL;
return (void *)strm->vtbl;
}
int32_t mz_stream_get_prop_int64(void *stream, int32_t prop, int64_t *value)
{
mz_stream *strm = (mz_stream *)stream;

View File

@ -91,6 +91,7 @@ int32_t mz_stream_close(void *stream);
int32_t mz_stream_error(void *stream);
int32_t mz_stream_set_base(void *stream, void *base);
void* mz_stream_get_interface(void *stream);
int32_t mz_stream_get_prop_int64(void *stream, int32_t prop, int64_t *value);
int32_t mz_stream_set_prop_int64(void *stream, int32_t prop, int64_t value);