str_destroy and str_free

This commit is contained in:
2025-11-26 17:03:54 +05:00
parent 4c97787c27
commit 8a40caaf10
3 changed files with 35 additions and 7 deletions

View File

@@ -3,21 +3,29 @@ C library with collections, strings, exceptions, io...
## Build
1. Clone the repository.
1. Clone this repository.
```
git clone https://timerix.ddns.net/git/Timerix/tlibc.git
```
2. Install [cbuild](https://timerix.ddns.net/git/Timerix/cbuild).
2. Install [cbuild](https://timerix.ddns.net/git/Timerix/cbuild) version specified in `project.config`.
3. Build static library
```
cd tlibc
cbuild build_static_lib_dbg
```
## Usage
Include `tlibc/tlibc.h` and put this code at the beginning of `main()`.
```
Deferral(32);
```c
#include "tlibc/tlibc.h"
int main(){
Deferral(32); // reserve memory for 32 defers
try_fatal_void(tlibc_init());
Defer(tlibc_deinit());
Return 0; // call defers
}
```