summaryrefslogtreecommitdiffhomepage
path: root/docs/ccommon_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-12-19 09:04:23 +0100
committerTyge Løvset <[email protected]>2022-12-19 09:04:23 +0100
commit1d4ad83d6f3388982cb0aeadbc9815b4776df504 (patch)
tree6d0d389219644b127eaa83c8a54ccd93deef96b7 /docs/ccommon_api.md
parent26a75a218a115a10cee82534be568a606c83dbb2 (diff)
downloadSTC-modified-1d4ad83d6f3388982cb0aeadbc9815b4776df504.tar.gz
STC-modified-1d4ad83d6f3388982cb0aeadbc9815b4776df504.zip
Renames:
cstr_null => cstr_NULL csview_null => csview_NULL cstr_npos => c_NPOS csview_npos => c_NPOS c_ARGsv(sv) => c_ARGSV(sv) c_init(x) => c_INIT(x)
Diffstat (limited to 'docs/ccommon_api.md')
-rw-r--r--docs/ccommon_api.md5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md
index 8a11042b..8f887626 100644
--- a/docs/ccommon_api.md
+++ b/docs/ccommon_api.md
@@ -84,7 +84,7 @@ cvec_str readFile(const char* name)
cvec_str vec = cvec_str_init(); // returned
c_with (FILE* fp = fopen(name, "r"), fclose(fp))
- c_with (cstr line = cstr_null, cstr_drop(&line))
+ c_with (cstr line = cstr_NULL, cstr_drop(&line))
while (cstr_getline(&line, fp))
cvec_str_emplace_back(&vec, cstr_str(&line));
return vec;
@@ -313,7 +313,7 @@ if (it.ref) cmap_str_erase_at(&map, it);
c_erase_if(i, csmap_str, map, cstr_contains(i.ref, "hello"));
```
-### c_new, c_alloc, c_alloc_n, c_drop, c_init
+### c_new, c_alloc, c_alloc_n, c_drop
| Usage | Meaning |
|:-------------------------------|:----------------------------------------|
@@ -321,7 +321,6 @@ c_erase_if(i, csmap_str, map, cstr_contains(i.ref, "hello"));
| `c_alloc (type)` | `(type *) c_malloc(sizeof(type))` |
| `c_alloc_n (type, N)` | `(type *) c_malloc((N)*sizeof(type))` |
| `c_drop (ctype, &c1, ..., &cN)` | `ctype_drop(&c1); ... ctype_drop(&cN)` |
-| `c_init(type){value...}` | `(type){value...}` // c++ compatability |
```c
struct Pnt { double x, y, z; };