## Summary Standardize naming conventions across the entire wizapp-stdlib codebase by replacing inconsistent prefixes and snake_case with a unified `wp` prefix + CamelCase scheme. ## Changes ### Naming convention applied | Pattern | Before | After | |---|---|---| | Public functions | `wapp_module_function` | `wpModuleFunction` | | Public types | `GenericXxx`, bare `Xxx` | `WpXxx` | | Constants / enum values | `WAPP_XXX`, `SHELL_XXX` | `WP_XXX`, `WP_SHELL_XXX` | | Internal functions | `_module_function` | `_moduleFunction` | | Storage-class macros | `wapp_extern`, `wapp_intern` | `wp_extern`, `wp_intern` | ### Modules affected All 20 modules were renamed: `arena`, `array`, `dbl_list`, `queue`, `str8`, `mem_allocator`, `mem_utils`, `mem_os`, `file`, `cpath`, `log`, `shell_commander`, `shell_termcolour`, `shell_utils`, `prng/xorshift`, `uuid`, `tester`, `aliases`, `assert`, `misc_utils`, `platform` — plus their test files. ### Backward compatibility Added `src/oldnames.h` with `#define OLD_NAME NEW_NAME` for every renamed symbol, organized by module under Constants → Types → Functions sections. Existing code that includes this file will compile without changes. Reviewed-on: #12 Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com> Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit was merged in pull request #12.
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
#include "../platform/platform.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(WAPP_PLATFORM_C) && WAPP_PLATFORM_C_VERSION >= WAPP_PLATFORM_C11_VERSION && !defined(WAPP_PLATFORM_APPLE)
|
||||
#if defined(WP_PLATFORM_C) && WP_PLATFORM_C_VERSION >= WP_PLATFORM_C11_VERSION && !defined(WP_PLATFORM_APPLE)
|
||||
#include <uchar.h>
|
||||
|
||||
#if WAPP_PLATFORM_C_VERSION >= WAPP_PLATFORM_C23_VERSION
|
||||
#if WP_PLATFORM_C_VERSION >= WP_PLATFORM_C23_VERSION
|
||||
typedef char8_t c8;
|
||||
#else
|
||||
typedef uint8_t c8;
|
||||
#endif // !WAPP_PLATFORM_C23_VERSION
|
||||
#endif // !WP_PLATFORM_C23_VERSION
|
||||
|
||||
typedef char16_t c16;
|
||||
typedef char32_t c32;
|
||||
@@ -21,7 +21,7 @@
|
||||
typedef uint8_t c8;
|
||||
typedef uint16_t c16;
|
||||
typedef uint32_t c32;
|
||||
#endif // !WAPP_PLATFORM_C
|
||||
#endif // !WP_PLATFORM_C
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
@@ -30,7 +30,7 @@ typedef uint64_t u64;
|
||||
|
||||
typedef uint8_t b8;
|
||||
|
||||
#ifndef WAPP_PLATFORM_CPP
|
||||
#ifndef WP_PLATFORM_CPP
|
||||
|
||||
#ifndef false
|
||||
#define false (b8)0
|
||||
@@ -40,7 +40,7 @@ typedef uint8_t b8;
|
||||
#define true (b8)1
|
||||
#endif // !true
|
||||
|
||||
#endif // !WAPP_PLATFORM_CPP
|
||||
#endif // !WP_PLATFORM_CPP
|
||||
|
||||
typedef int8_t i8;
|
||||
typedef int16_t i16;
|
||||
@@ -54,14 +54,14 @@ typedef long double f128;
|
||||
typedef uintptr_t uptr;
|
||||
typedef intptr_t iptr;
|
||||
|
||||
#define wapp_extern extern
|
||||
#define wapp_intern static
|
||||
#define wapp_persist static
|
||||
#define wp_extern extern
|
||||
#define wp_intern static
|
||||
#define wp_persist static
|
||||
|
||||
#ifdef WAPP_PLATFORM_CPP
|
||||
#define wapp_class_mem static
|
||||
#define BEGIN_C_LINKAGE wapp_extern "C" {
|
||||
#ifdef WP_PLATFORM_CPP
|
||||
#define wp_class_mem static
|
||||
#define BEGIN_C_LINKAGE wp_extern "C" {
|
||||
#define END_C_LINKAGE }
|
||||
#endif // WAPP_PLATFORM_CPP
|
||||
#endif // WP_PLATFORM_CPP
|
||||
|
||||
#endif // !ALIASES_H
|
||||
|
||||
Reference in New Issue
Block a user