Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 96fb957991 | |||
| 0cbee45ad2 |
+9
-1
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.0.3] - 2026-02-10
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- **Compilation**: Fixed GCC `-Wrestrict` warning in Linux directory watching code by replacing `strncpy` with `memmove` for overlapping memory operations
|
||||||
|
- Ensures clean compilation without warnings while maintaining identical runtime behavior
|
||||||
|
- Uses semantically correct function for moving memory within the same buffer
|
||||||
|
|
||||||
## [0.0.2] - 2026-02-09
|
## [0.0.2] - 2026-02-09
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@@ -37,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Dependency management and versioning not yet implemented
|
- Dependency management and versioning not yet implemented
|
||||||
- API is unstable and subject to change in future releases
|
- API is unstable and subject to change in future releases
|
||||||
|
|
||||||
[Unreleased]: https://github.com/anth64/stk/compare/v0.0.2...HEAD
|
[Unreleased]: https://github.com/anth64/stk/compare/v0.0.3...HEAD
|
||||||
|
[0.0.3]: https://github.com/anth64/stk/releases/tag/v0.0.3
|
||||||
[0.0.2]: https://github.com/anth64/stk/releases/tag/v0.0.2
|
[0.0.2]: https://github.com/anth64/stk/releases/tag/v0.0.2
|
||||||
[0.0.1]: https://github.com/anth64/stk/releases/tag/v0.0.1
|
[0.0.1]: https://github.com/anth64/stk/releases/tag/v0.0.1
|
||||||
|
|||||||
@@ -173,15 +173,15 @@ stk_init();
|
|||||||
|
|
||||||
## Project Status
|
## Project Status
|
||||||
|
|
||||||
**Current Version:** 0.0.2 (Pre-release)
|
**Current Version:** 0.0.3 (Pre-release)
|
||||||
|
|
||||||
This is an early bugfix release improving hot-reload stability on Linux. Phase 1 is still in progress.
|
This is an early bugfix release improving compilation warnings on Linux. Phase 1 is still in progress.
|
||||||
|
|
||||||
### What Works
|
### What Works
|
||||||
- Cross-platform module loading and hot-reloading
|
- Cross-platform module loading and hot-reloading
|
||||||
- File watching (inotify/kqueue/FindFirstFile)
|
- File watching (inotify/kqueue/FindFirstFile)
|
||||||
- Basic error handling
|
- Basic error handling
|
||||||
- Stable hot-reload even during rapid file changes (Linux fix in 0.0.2)
|
- Stable hot-reload even during rapid file changes
|
||||||
|
|
||||||
### In Progress (Phase 1)
|
### In Progress (Phase 1)
|
||||||
- Complete logging system (log levels, verbosity, output configuration)
|
- Complete logging system (log levels, verbosity, output configuration)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#define STK_VERSION_MAJOR 0
|
#define STK_VERSION_MAJOR 0
|
||||||
#define STK_VERSION_MINOR 0
|
#define STK_VERSION_MINOR 0
|
||||||
#define STK_VERSION_PATCH 2
|
#define STK_VERSION_PATCH 3
|
||||||
|
|
||||||
#define STK_STRINGIFY_HELPER(x) #x
|
#define STK_STRINGIFY_HELPER(x) #x
|
||||||
#define STK_STRINGIFY(x) STK_STRINGIFY_HELPER(x)
|
#define STK_STRINGIFY(x) STK_STRINGIFY_HELPER(x)
|
||||||
|
|||||||
+8
-10
@@ -662,7 +662,7 @@ stk_module_event_t *platform_directory_watch_check(
|
|||||||
int fd = (int)(long)handle;
|
int fd = (int)(long)handle;
|
||||||
char buf[STK_EVENT_BUFFER];
|
char buf[STK_EVENT_BUFFER];
|
||||||
ssize_t len;
|
ssize_t len;
|
||||||
size_t index = 0, count = 0, i, write_idx;
|
size_t index = 0, count = 0, i, write_index;
|
||||||
stk_module_event_t *evs;
|
stk_module_event_t *evs;
|
||||||
char *ptr, *end;
|
char *ptr, *end;
|
||||||
struct inotify_event *e;
|
struct inotify_event *e;
|
||||||
@@ -760,20 +760,18 @@ stk_module_event_t *platform_directory_watch_check(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
write_idx = 0;
|
write_index = 0;
|
||||||
for (i = 0; i < index; ++i) {
|
for (i = 0; i < index; ++i) {
|
||||||
if (evs[i] != -1) {
|
if (evs[i] != -1) {
|
||||||
if (write_idx != i) {
|
if (write_index != i) {
|
||||||
evs[write_idx] = evs[i];
|
evs[write_index] = evs[i];
|
||||||
strncpy((*file_list)[write_idx],
|
memmove((*file_list)[write_index],
|
||||||
(*file_list)[i], STK_PATH_MAX - 1);
|
(*file_list)[i], STK_PATH_MAX);
|
||||||
(*file_list)[write_idx][STK_PATH_MAX - 1] =
|
|
||||||
'\0';
|
|
||||||
}
|
}
|
||||||
write_idx++;
|
write_index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
index = write_idx;
|
index = write_index;
|
||||||
|
|
||||||
*out_count = index;
|
*out_count = index;
|
||||||
return evs;
|
return evs;
|
||||||
|
|||||||
Reference in New Issue
Block a user