diff options
| author | Tyge Løvset <[email protected]> | 2022-04-27 19:07:18 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-04-27 19:07:18 +0200 |
| commit | edfcc712b48e2a582bcad1bc5a4102f18154e549 (patch) | |
| tree | 70ed252f3bfd4e5841a25d802da630b73e58b800 /docs/carc_api.md | |
| parent | df73eddd7933df7c96269f11e37fc1a96916f747 (diff) | |
| download | STC-modified-edfcc712b48e2a582bcad1bc5a4102f18154e549.tar.gz STC-modified-edfcc712b48e2a582bcad1bc5a4102f18154e549.zip | |
Final fixes to carc and cbox; Reverted constructor name to make; (similarity to make_shared/make_unique in c++).
Diffstat (limited to 'docs/carc_api.md')
| -rw-r--r-- | docs/carc_api.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/carc_api.md b/docs/carc_api.md index 301c25b1..ea5dea1f 100644 --- a/docs/carc_api.md +++ b/docs/carc_api.md @@ -32,8 +32,8 @@ See similar c++ class [std::shared_ptr](https://en.cppreference.com/w/cpp/memory ## Methods ```c carc_X carc_X_init(); // empty shared pointer -carc_X carc_X_make(i_valraw raw); // create owned value from raw type, if defined. -carc_X carc_X_from(i_val val); // create new heap allocated object. Take ownership of val. +carc_X carc_X_from(i_valraw raw); // construct a new value in an carc from raw type. +carc_X carc_X_make(i_val val); // make a carc from constructed val object. Faster than from_ptr(). carc_X carc_X_from_ptr(i_val* p); // create a carc from raw pointer. Takes ownership of p. carc_X carc_X_clone(carc_X other); // return other with increased use count @@ -45,7 +45,7 @@ void carc_X_drop(carc_X* self); // destruct (decr long carc_X_use_count(carc_X ptr); void carc_X_reset(carc_X* self); -void carc_X_reset_from(carc_X* self, i_val val); // assign new carc with value. Takes ownership of val. +void carc_X_reset_to(carc_X* self, i_val* p); // assign new carc from ptr. Takes ownership of p. uint64_t carc_X_value_hash(const i_val* x); // hash value int carc_X_value_cmp(const i_val* x, const i_val* y); // compares pointer addresses if 'i_opt c_no_cmp' |
