Skip to content

Commit

Permalink
Fixed wrong parameter type of php_stream_mmap_range()
Browse files Browse the repository at this point in the history
There are several warings about this.
The mode type should be php_stream_mmap_access_t but not php_stream_mmap_operate_t
  • Loading branch information
reeze committed Mar 4, 2015
1 parent 2fa4d1d commit 98766e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main/streams/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "php.h"
#include "php_streams_int.h"

PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mmap_operation_t mode, size_t *mapped_len)
PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mmap_access_t mode, size_t *mapped_len)
{
php_stream_mmap_range range;

Expand Down
2 changes: 1 addition & 1 deletion main/streams/php_stream_mmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef struct {
#define php_stream_mmap_possible(stream) (!php_stream_is_filtered((stream)) && php_stream_mmap_supported((stream)))

BEGIN_EXTERN_C()
PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mmap_operation_t mode, size_t *mapped_len);
PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mmap_access_t mode, size_t *mapped_len);
#define php_stream_mmap_range(stream, offset, length, mode, mapped_len) _php_stream_mmap_range((stream), (offset), (length), (mode), (mapped_len))

/* un-maps the last mapped range */
Expand Down

0 comments on commit 98766e6

Please sign in to comment.