| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d8e0dea commit dc49561
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ extern "C" { | |||
| 10 | 10 | ||
| 11 | 11 | #define UVWASI_VERSION_MAJOR 0 | |
| 12 | 12 | #define UVWASI_VERSION_MINOR 0 | |
| 13 | - #define UVWASI_VERSION_PATCH 9 | ||
| 13 | + #define UVWASI_VERSION_PATCH 10 | ||
| 14 | 14 | #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ | |
| 15 | 15 | (UVWASI_VERSION_MINOR << 8) | \ | |
| 16 | 16 | (UVWASI_VERSION_PATCH)) | |
@@ -50,8 +50,8 @@ typedef struct uvwasi_s { | |||
| 50 | 50 | } uvwasi_t; | |
| 51 | 51 | ||
| 52 | 52 | typedef struct uvwasi_preopen_s { | |
| 53 | - char* mapped_path; | ||
| 54 | - char* real_path; | ||
| 53 | + const char* mapped_path; | ||
| 54 | + const char* real_path; | ||
| 55 | 55 | } uvwasi_preopen_t; | |
| 56 | 56 | ||
| 57 | 57 | typedef struct uvwasi_options_s { | |
@@ -70,6 +70,7 @@ typedef struct uvwasi_options_s { | |||
| 70 | 70 | /* Embedder API. */ | |
| 71 | 71 | uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, uvwasi_options_t* options); | |
| 72 | 72 | void uvwasi_destroy(uvwasi_t* uvwasi); | |
| 73 | + void uvwasi_options_init(uvwasi_options_t* options); | ||
| 73 | 74 | /* Use int instead of uv_file to avoid needing uv.h */ | |
| 74 | 75 | uvwasi_errno_t uvwasi_embedder_remap_fd(uvwasi_t* uvwasi, | |
| 75 | 76 | const uvwasi_fd_t fd, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,21 +5,20 @@ | |||
| 5 | 5 | ||
| 6 | 6 | /* Basic uint{8,16,32,64}_t read/write functions. */ | |
| 7 | 7 | ||
| 8 | - #define BASIC_TYPE_(name, type) \ | ||
| 8 | + #define BASIC_TYPE(name, type) \ | ||
| 9 | 9 | void uvwasi_serdes_write_##name(void* ptr, size_t offset, type value); \ | |
| 10 | 10 | type uvwasi_serdes_read_##name(const void* ptr, size_t offset); \ | |
| 11 | 11 | ||
| 12 | - #define BASIC_TYPE(type) BASIC_TYPE_(type, type) | ||
| 13 | - #define BASIC_TYPE_UVWASI(type) BASIC_TYPE_(type, uvwasi_##type) | ||
| 12 | + #define BASIC_TYPE_UVWASI(type) BASIC_TYPE(type, uvwasi_##type) | ||
| 14 | 13 | ||
| 15 | 14 | #define UVWASI_SERDES_SIZE_uint8_t sizeof(uint8_t) | |
| 16 | - BASIC_TYPE(uint8_t) | ||
| 15 | + BASIC_TYPE(uint8_t, uint8_t) | ||
| 17 | 16 | #define UVWASI_SERDES_SIZE_uint16_t sizeof(uint16_t) | |
| 18 | - BASIC_TYPE(uint16_t) | ||
| 17 | + BASIC_TYPE(uint16_t, uint16_t) | ||
| 19 | 18 | #define UVWASI_SERDES_SIZE_uint32_t sizeof(uint32_t) | |
| 20 | - BASIC_TYPE(uint32_t) | ||
| 19 | + BASIC_TYPE(uint32_t, uint32_t) | ||
| 21 | 20 | #define UVWASI_SERDES_SIZE_uint64_t sizeof(uint64_t) | |
| 22 | - BASIC_TYPE(uint64_t) | ||
| 21 | + BASIC_TYPE(uint64_t, uint64_t) | ||
| 23 | 22 | ||
| 24 | 23 | #define UVWASI_SERDES_SIZE_advice_t sizeof(uvwasi_advice_t) | |
| 25 | 24 | BASIC_TYPE_UVWASI(advice_t) | |
@@ -80,7 +79,6 @@ BASIC_TYPE_UVWASI(whence_t) | |||
| 80 | 79 | ||
| 81 | 80 | #undef BASIC_TYPE_UVWASI | |
| 82 | 81 | #undef BASIC_TYPE | |
| 83 | - #undef BASIC_TYPE_ | ||
| 84 | 82 | ||
| 85 | 83 | /* WASI structure read/write functions. */ | |
| 86 | 84 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,12 +2,14 @@ | |||
| 2 | 2 | #define __UVWASI_DEBUG_H__ | |
| 3 | 3 | ||
| 4 | 4 | #ifdef UVWASI_DEBUG_LOG | |
| 5 | + #ifndef __STDC_FORMAT_MACROS | ||
| 5 | 6 | # define __STDC_FORMAT_MACROS | |
| 7 | + #endif | ||
| 6 | 8 | # include <inttypes.h> | |
| 7 | - # define DEBUG(fmt, ...) \ | ||
| 9 | + # define UVWASI_DEBUG(fmt, ...) \ | ||
| 8 | 10 | do { fprintf(stderr, fmt, __VA_ARGS__); } while (0) | |
| 9 | 11 | #else | |
| 10 | - # define DEBUG(fmt, ...) | ||
| 12 | + # define UVWASI_DEBUG(fmt, ...) | ||
| 11 | 13 | #endif | |
| 12 | 14 | ||
| 13 | 15 | #endif /* __UVWASI_DEBUG_H__ */ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments