Replace extern
This commit is contained in:
@@ -60,7 +60,7 @@ typedef intptr_t iptr;
|
|||||||
|
|
||||||
#ifdef WAPP_PLATFORM_CPP
|
#ifdef WAPP_PLATFORM_CPP
|
||||||
#define wapp_class_mem static
|
#define wapp_class_mem static
|
||||||
#define BEGIN_C_LINKAGE extern "C" {
|
#define BEGIN_C_LINKAGE wapp_extern "C" {
|
||||||
#define END_C_LINKAGE }
|
#define END_C_LINKAGE }
|
||||||
#endif // WAPP_PLATFORM_CPP
|
#endif // WAPP_PLATFORM_CPP
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
BEGIN_C_LINKAGE
|
BEGIN_C_LINKAGE
|
||||||
#endif // !WAPP_PLATFORM_CPP
|
#endif // !WAPP_PLATFORM_CPP
|
||||||
|
|
||||||
#define wapp_static_assert(EXPR, MSG) extern char ASSERTION_FAILED[EXPR ? 1 : -1]
|
#define wapp_static_assert(EXPR, MSG) wapp_extern char ASSERTION_FAILED[EXPR ? 1 : -1]
|
||||||
|
|
||||||
#ifndef WAPP_NO_RUNTIME_ASSERT
|
#ifndef WAPP_NO_RUNTIME_ASSERT
|
||||||
#define wapp_runtime_assert(EXPR, MSG) __wapp_runtime_assert(EXPR, MSG)
|
#define wapp_runtime_assert(EXPR, MSG) __wapp_runtime_assert(EXPR, MSG)
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ BEGIN_C_LINKAGE
|
|||||||
#endif // !WAPP_PLATFORM_CPP
|
#endif // !WAPP_PLATFORM_CPP
|
||||||
|
|
||||||
typedef struct WFile WFile;
|
typedef struct WFile WFile;
|
||||||
|
// wapp_extern WFile *WF_STDIN;
|
||||||
|
// wapp_extern WFile *WF_STDOUT;
|
||||||
|
// wapp_extern WFile *WF_STDERR;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
WAPP_ACCESS_READ, // Equivalent to r
|
WAPP_ACCESS_READ, // Equivalent to r
|
||||||
@@ -47,14 +50,14 @@ i32 wapp_file_close(WFile *file);
|
|||||||
i32 wapp_file_rename(Str8RO *old_filepath, Str8RO *new_filepath);
|
i32 wapp_file_rename(Str8RO *old_filepath, Str8RO *new_filepath);
|
||||||
i32 wapp_file_remove(Str8RO *filepath);
|
i32 wapp_file_remove(Str8RO *filepath);
|
||||||
|
|
||||||
extern WFile *_file_open(const Allocator *allocator, Str8RO *filepath, FileAccessMode mode);
|
wapp_extern WFile *_file_open(const Allocator *allocator, Str8RO *filepath, FileAccessMode mode);
|
||||||
extern i64 _file_seek(WFile *file, i64 offset, FileSeekOrigin origin);
|
wapp_extern i64 _file_seek(WFile *file, i64 offset, FileSeekOrigin origin);
|
||||||
extern u64 _file_read(void *dst_buf, u64 byte_count, WFile *file, u64 file_length);
|
wapp_extern u64 _file_read(void *dst_buf, u64 byte_count, WFile *file, u64 file_length);
|
||||||
extern i64 _file_write(const void *src_buf, WFile *file, u64 byte_count);
|
wapp_extern i64 _file_write(const void *src_buf, WFile *file, u64 byte_count);
|
||||||
extern i32 _file_flush(WFile *file);
|
wapp_extern i32 _file_flush(WFile *file);
|
||||||
extern i32 _file_close(WFile *file);
|
wapp_extern i32 _file_close(WFile *file);
|
||||||
extern i32 _file_rename(Str8RO *old_filepath, Str8RO *new_filepath);
|
wapp_extern i32 _file_rename(Str8RO *old_filepath, Str8RO *new_filepath);
|
||||||
extern i32 _file_remove(Str8RO *filepath);
|
wapp_extern i32 _file_remove(Str8RO *filepath);
|
||||||
|
|
||||||
#ifdef WAPP_PLATFORM_CPP
|
#ifdef WAPP_PLATFORM_CPP
|
||||||
END_C_LINKAGE
|
END_C_LINKAGE
|
||||||
|
|||||||
Reference in New Issue
Block a user