Skip to content

Commit

Permalink
make options const for uvwasi_init (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
axic authored Oct 1, 2020
1 parent 7a639ce commit b96407e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/uvwasi.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef struct uvwasi_options_s {
} uvwasi_options_t;

/* Embedder API. */
uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, uvwasi_options_t* options);
uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, const uvwasi_options_t* options);
void uvwasi_destroy(uvwasi_t* uvwasi);
void uvwasi_options_init(uvwasi_options_t* options);
/* Use int instead of uv_file to avoid needing uv.h */
Expand Down
2 changes: 1 addition & 1 deletion src/fd_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ uvwasi_errno_t uvwasi_fd_table_insert(uvwasi_t* uvwasi,


uvwasi_errno_t uvwasi_fd_table_init(uvwasi_t* uvwasi,
uvwasi_options_t* options) {
const uvwasi_options_t* options) {
struct uvwasi_fd_table_t* table;
uvwasi_errno_t err;
int r;
Expand Down
2 changes: 1 addition & 1 deletion src/fd_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct uvwasi_fd_table_t {
};

uvwasi_errno_t uvwasi_fd_table_init(struct uvwasi_s* uvwasi,
struct uvwasi_options_s* options);
const struct uvwasi_options_s* options);
void uvwasi_fd_table_free(struct uvwasi_s* uvwasi,
struct uvwasi_fd_table_t* table);
uvwasi_errno_t uvwasi_fd_table_insert(struct uvwasi_s* uvwasi,
Expand Down
2 changes: 1 addition & 1 deletion src/uvwasi.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static uvwasi_errno_t uvwasi__setup_ciovs(const uvwasi_t* uvwasi,
}


uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, uvwasi_options_t* options) {
uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, const uvwasi_options_t* options) {
uv_fs_t realpath_req;
uv_fs_t open_req;
uvwasi_errno_t err;
Expand Down

0 comments on commit b96407e

Please sign in to comment.