From cf2ff10878153588b69e7e34523773e2bc42d79e Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 24 Oct 2022 12:23:30 +0200 Subject: API CHANGE: Renamed input params for naming consisteny and usage: i_key_class TYPE => i_keyclass TYPE i_val_class TYPE => i_valclass TYPE i_key_arcbox TYPE => i_keyboxed TYPE i_val_arcbox TYPE => i_valboxed TYPE i_key_bind, i_val_bind are removed. --- README.md | 16 ++++++------ docs/carc_api.md | 4 +-- docs/cbox_api.md | 6 ++--- docs/cmap_api.md | 8 +++--- docs/cvec_api.md | 2 +- examples/arc_containers.c | 4 +-- examples/arc_demo.c | 4 +-- examples/arcvec_erase.c | 2 +- examples/box.c | 4 +-- examples/box2.c | 2 +- examples/city.c | 6 ++--- examples/complex.c | 6 ++--- examples/forfilter.c | 2 +- examples/mapmap.c | 2 +- examples/mmap.c | 2 +- examples/multimap.c | 4 +-- examples/music_arc.c | 4 +-- examples/new_sptr.c | 6 ++--- examples/person_arc.c | 4 +-- examples/rawptr_elements.c | 2 +- examples/vikings.c | 4 +-- include/stc/carc.h | 4 +-- include/stc/cbox.h | 6 ++--- include/stc/template.h | 61 ++++++++++++++++++++-------------------------- 24 files changed, 78 insertions(+), 87 deletions(-) diff --git a/README.md b/README.md index d5a22db4..4548ea55 100644 --- a/README.md +++ b/README.md @@ -329,14 +329,14 @@ Val: Specials: - `i_key_str` - Define key type *cstr* and container i_tag = *str*. It binds type convertion from/to *const char*\*, and the ***cmp***, ***eq***, ***hash***, and ***keydrop*** functions. - `i_key_ssv` - Define key type *cstr* and container i_tag = *ssv*. It binds type convertion from/to *csview*, and its ***cmp***, ***eq***, ***hash***, and ***keydrop*** functions. -- `i_key_arcbox TYPE` - Define container key type where TYPE is a smart pointer **carc** or **cbox**. NB: not to be used when defining carc/cbox types themselves. -- `i_key_class TYPE` - General version of the three above - will auto-bind to standard named functions: *TYPE_clone*, *TYPE_drop*, *TYPE_cmp*, *TYPE_eq*, *TYPE_hash*. If `i_keyraw` is defined, *TYPE_toraw* function is bound to `i_keyto`. Only functions required by the particular container need to be defined. E.g., only **cmap** and **cset** and smart pointers uses *TYPE_hash* and *TYPE_eq*. **cstack** does not use *TYPE_cmp*. *TYPE_clone* is not used if *#define i_opt c_no_clone* is specified. Likewise, *TYPE_cmp* is not used if *#define i_opt c_no_cmp* is specified. -- `i_val_str`, `i_val_ssv`, `i_val_arcbox`, `i_val_class` - Similar rules as for ***key***. +- `i_keyboxed TYPE` - Define container key type where TYPE is a smart pointer **carc** or **cbox**. NB: not to be used when defining carc/cbox types themselves. +- `i_keyclass TYPE` - General version of the three above - will auto-bind to standard named functions: *TYPE_clone*, *TYPE_drop*, *TYPE_cmp*, *TYPE_eq*, *TYPE_hash*. If `i_keyraw` is defined, *TYPE_toraw* function is bound to `i_keyto`. Only functions required by the particular container need to be defined. E.g., only **cmap** and **cset** and smart pointers uses *TYPE_hash* and *TYPE_eq*. **cstack** does not use *TYPE_cmp*. *TYPE_clone* is not used if *#define i_opt c_no_clone* is specified. Likewise, *TYPE_cmp* is not used if *#define i_opt c_no_cmp* is specified. +- `i_val_str`, `i_val_ssv`, `i_valboxed`, `i_valclass` - Similar rules as for ***key***. **Notes**: - Instead of defining `i_cmp`, you may define *i_opt c_no_cmp* to disable *searching and sorting* functions. - Instead of defining `i_*clone`, you may define *i_opt c_no_clone* to disable *clone* functionality. -- For `i_key_class`, if *i_keyraw RAWTYPE* is defined along with it, *i_keyfrom* may also be defined to enable the *emplace*-functions. Note: the signature for ***cmp***, ***eq***, and ***hash*** uses *RAWTYPE* as input. +- For `i_keyclass`, if *i_keyraw RAWTYPE* is defined along with it, *i_keyfrom* may also be defined to enable the *emplace*-functions. Note: the signature for ***cmp***, ***eq***, and ***hash*** uses *RAWTYPE* as input. The *emplace* versus non-emplace container methods -------------------------------------------------- @@ -519,14 +519,14 @@ Memory efficiency - Renamed: ***i_equ*** to `i_eq`, and ***_equalto*** to `_eq`. - Renamed: ***i_cnt*** to `i_type` for defining the complete container type name. - Renamed: type **csptr** to [**carc**](docs/carc_api.md) (atomic reference counted) smart pointer. -- Renamed: ***i_key_csptr*** / ***i_val_csptr*** to `i_key_arcbox` / `i_val_arcbox` for specifying **carc** and **cbox** values in containers. +- Renamed: ***i_key_csptr*** / ***i_val_csptr*** to `i_keyboxed` / `i_valboxed` for specifying **carc** and **cbox** values in containers. - Renamed: *csptr_X_make()* to `carc_X_from()`. - Renamed: *cstr_lit()* to `cstr_new(literal)`, and *cstr_assign_fmt()* to `cstr_printf()`. - Renamed: *c_default_fromraw()* to `c_default_from()`. - Changed: the [**c_apply**](docs/ccommon_api.md) macros API. - Replaced: *csview_first_token()* and *csview_next_token()* with one function: `csview_token()`. - Added: **checkauto** tool for checking that c-source files uses `c_auto*` macros correctly. -- Added: general `i_key_class` / `i_val_class` template parameters which auto-binds template functions. +- Added: general `i_keyclass` / `i_valclass` template parameters which auto-binds template functions. - Added: `i_opt` template parameter: compile-time options: `c_no_cmp`, `c_no_clone`, `c_no_atomic`, `c_is_fwd`; may be combined with `|` - Added: [**cbox**](docs/cbox_api.md) type: smart pointer, similar to [Rust Box](https://doc.rust-lang.org/rust-by-example/std/box.html) and [std::unique_ptr](https://en.cppreference.com/w/cpp/memory/unique_ptr). - Added: [**c_forpair**](docs/ccommon_api.md) macro: for-loop with "structured binding" @@ -543,8 +543,8 @@ Replace (whole word + match case): - `i_valdel` ⟶ `i_valdrop` - `i_cnt` ⟶ `i_type` - `cstr_lit` ⟶ `cstr_new` -- `i_key_sptr` ⟶ `i_key_arcbox` -- `i_val_sptr` ⟶ `i_val_arcbox` +- `i_key_sptr` ⟶ `i_keyboxed` +- `i_val_sptr` ⟶ `i_valboxed` Non-regex, global match case replace: - `csptr` ⟶ `carc` diff --git a/docs/carc_api.md b/docs/carc_api.md index 4dea2b2c..04856622 100644 --- a/docs/carc_api.md +++ b/docs/carc_api.md @@ -13,7 +13,7 @@ All **carc** functions can be called by multiple threads on different instances additional synchronization even if these instances are copies and share ownership of the same object. **carc** uses thread-safe atomic reference counting, through the *carc_X_clone()* and *carc_X_drop()* methods. -When declaring a container with shared pointers, define `i_val_arcbox` with the carc type, see example. +When declaring a container with shared pointers, define `i_valboxed` with the carc type, see example. See similar c++ class [std::shared_ptr](https://en.cppreference.com/w/cpp/memory/shared_ptr) for a functional reference, or Rust [std::sync::Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html) / [std::rc::Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html). @@ -89,7 +89,7 @@ bool carc_X_value_eq(const i_val* x, const i_val* y); #include #define i_type Stack -#define i_val_arcbox Arc // Note: use i_val_arcbox for carc or cbox value types +#define i_valboxed Arc // Note: use i_valboxed for carc or cbox value types #include int main() diff --git a/docs/cbox_api.md b/docs/cbox_api.md index 43fa46b0..79911876 100644 --- a/docs/cbox_api.md +++ b/docs/cbox_api.md @@ -5,7 +5,7 @@ be empty. The *cbox_X_cmp()*, *cbox_X_drop()* methods are defined based on the ` and `i_valdrop` macros specified. Use *cbox_X_clone(p)* to make a deep copy, which uses the `i_valclone` macro if defined. -When declaring a container of **cbox** values, define `i_val_arcbox` with the +When declaring a container of **cbox** values, define `i_valboxed` with the cbox type instead of defining `i_val`. This will auto-set `i_valdrop`, `i_valclone`, and `i_cmp` using functions defined by the specified **cbox**. @@ -79,11 +79,11 @@ void int_drop(int* x) { #include #define i_type ISet -#define i_key_arcbox IBox // NB: use i_key_arcbox instead of i_key +#define i_keyboxed IBox // NB: use i_keyboxed instead of i_key #include // ISet : std::set> #define i_type IVec -#define i_val_arcbox IBox // NB: use i_val_arcbox instead of i_val +#define i_valboxed IBox // NB: use i_valboxed instead of i_val #include // IVec : std::vector> int main() diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 119b72f2..bf56fcab 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -298,10 +298,10 @@ static inline void Viking_drop(Viking* vk) { } #define i_type Vikings -#define i_key_class Viking +#define i_keyclass Viking #define i_val int /* - i_key_class implies these defines, unless they are already defined: + i_keyclass implies these defines, unless they are already defined: #define i_cmp Viking_cmp #define i_hash Viking_hash #define i_keyclone Viking_clone @@ -377,7 +377,7 @@ static inline RViking Viking_toraw(const Viking* vp) { // With this in place, we define the Viking => int hash map type: #define i_type Vikings -#define i_key_class Viking +#define i_keyclass Viking #define i_keyraw RViking #define i_keyfrom Viking_from #define i_opt c_no_clone // disable map cloning @@ -385,7 +385,7 @@ static inline RViking Viking_toraw(const Viking* vp) { #define i_val int #include /* - i_key_class implies these defines, unless they are already defined: + i_keyclass implies these defines, unless they are already defined: #define i_cmp RViking_cmp //#define i_hash RViking_hash // already defined above. //#define i_keyclone Viking_clone // not used because c_no_clone diff --git a/docs/cvec_api.md b/docs/cvec_api.md index 50fb4448..f4cedb75 100644 --- a/docs/cvec_api.md +++ b/docs/cvec_api.md @@ -206,7 +206,7 @@ User User_clone(User user) { // Declare a managed, clonable vector of users. #define i_type UVec -#define i_val_class User // User is a "class" as it has _cmp, _clone and _drop functions. +#define i_valclass User // User is a "class" as it has _cmp, _clone and _drop functions. #include int main(void) { diff --git a/examples/arc_containers.c b/examples/arc_containers.c index 6e6f748f..5a8b3653 100644 --- a/examples/arc_containers.c +++ b/examples/arc_containers.c @@ -16,11 +16,11 @@ #include #define i_type Stack -#define i_val_arcbox Arc // define i_val_arcbox for carc/cbox value (not i_val) +#define i_valboxed Arc // define i_valboxed for carc/cbox value (not i_val) #include #define i_type List -#define i_val_arcbox Arc // as above +#define i_valboxed Arc // as above #include int main() diff --git a/examples/arc_demo.c b/examples/arc_demo.c index c282bdbd..087f90ac 100644 --- a/examples/arc_demo.c +++ b/examples/arc_demo.c @@ -13,10 +13,10 @@ void int_drop(int* x) { #define i_valdrop int_drop // optional, just to display the elements destroyed #include // Arc -#define i_key_arcbox Arc // note: use i_key_arcbox instead of i_key for carc/cbox elements +#define i_keyboxed Arc // note: use i_keyboxed instead of i_key for carc/cbox elements #include // csset_Arc (like: std::set>) -#define i_val_arcbox Arc // note: as above. +#define i_valboxed Arc // note: as above. #include // cvec_Arc (like: std::vector>) int main() diff --git a/examples/arcvec_erase.c b/examples/arcvec_erase.c index 6990c94a..c70d59d9 100644 --- a/examples/arcvec_erase.c +++ b/examples/arcvec_erase.c @@ -9,7 +9,7 @@ void show_drop(int* x) { printf("drop: %d\n", *x); } #include // Shared pointer to int #define i_type Vec -#define i_val_arcbox Arc +#define i_valboxed Arc #include // Vec: cvec diff --git a/examples/box.c b/examples/box.c index c95b2cb7..da13501f 100644 --- a/examples/box.c +++ b/examples/box.c @@ -28,11 +28,11 @@ void Person_drop(Person* p) { } #define i_type PBox -#define i_val_class Person // "class" binds _cmp, _clone, _drop functions. +#define i_valclass Person // "class" binds _cmp, _clone, _drop functions. #include #define i_type Persons -#define i_val_arcbox PBox // "arcbox" informs that PBox is a smart pointer. +#define i_valboxed PBox // "arcbox" informs that PBox is a smart pointer. #include int main() diff --git a/examples/box2.c b/examples/box2.c index 2413e3fe..f64eb239 100644 --- a/examples/box2.c +++ b/examples/box2.c @@ -24,7 +24,7 @@ struct { #include // cbox_Rectangle // Box in box: -#define i_val_arcbox cbox_Point // NB: use i_val_arcbox when value is a cbox or carc! +#define i_valboxed cbox_Point // NB: use i_valboxed when value is a cbox or carc! // it will auto define i_valdrop, i_valfrom, and i_cmp. #define i_tag BoxPoint #include // cbox_BoxPoint diff --git a/examples/city.c b/examples/city.c index 891e08f8..0996fe9b 100644 --- a/examples/city.c +++ b/examples/city.c @@ -13,17 +13,17 @@ City City_clone(City c); void City_drop(City* c); #define i_type CityArc -#define i_val_class City +#define i_valclass City #include //#include // try instead of cbox.h #define i_type Cities -#define i_key_arcbox CityArc +#define i_keyboxed CityArc #include #define i_type CityMap #define i_key int -#define i_val_arcbox CityArc +#define i_valboxed CityArc #include diff --git a/examples/complex.c b/examples/complex.c index c91f95d5..dd2f951a 100644 --- a/examples/complex.c +++ b/examples/complex.c @@ -14,18 +14,18 @@ #include #define i_type StackList -#define i_val_class FloatStack // "class" picks up _clone, _drop +#define i_valclass FloatStack // "class" picks up _clone, _drop #define i_opt c_no_cmp // no FloatStack_cmp() #include #define i_type ListMap #define i_key int -#define i_val_class StackList // "class" picks up _clone, _drop +#define i_valclass StackList // "class" picks up _clone, _drop #include #define i_type MapMap #define i_key_str -#define i_val_class ListMap +#define i_valclass ListMap #include diff --git a/examples/forfilter.c b/examples/forfilter.c index e1a3f1e5..cc7c3478 100644 --- a/examples/forfilter.c +++ b/examples/forfilter.c @@ -9,7 +9,7 @@ #include #define i_type SVec -#define i_val_class csview +#define i_valclass csview #include // filters and transforms: diff --git a/examples/mapmap.c b/examples/mapmap.c index 99f5e58d..488cc539 100644 --- a/examples/mapmap.c +++ b/examples/mapmap.c @@ -12,7 +12,7 @@ // Departments: std::map #define i_type Departments #define i_key_str -#define i_val_class People +#define i_valclass People // Shorthand for: // #define i_val People // #define i_cmp People_cmp diff --git a/examples/mmap.c b/examples/mmap.c index 6fe041e4..3934cf26 100644 --- a/examples/mmap.c +++ b/examples/mmap.c @@ -11,7 +11,7 @@ // Map of int => clist_str. #define i_type Multimap #define i_key int -#define i_val_class clist_str // uses clist_str as i_val and binds clist_str_clone, clist_str_drop +#define i_valclass clist_str // uses clist_str as i_val and binds clist_str_clone, clist_str_drop #define i_cmp -c_default_cmp // like std::greater #include diff --git a/examples/multimap.c b/examples/multimap.c index f8c5b6c2..e72bdce3 100644 --- a/examples/multimap.c +++ b/examples/multimap.c @@ -39,14 +39,14 @@ OlympicLocation OlympicLocation_clone(OlympicLocation loc); void OlympicLocation_drop(OlympicLocation* self); // Create a clist, can be sorted by year. -#define i_val_class OlympicLocation // binds _cmp, _clone and _drop. +#define i_valclass OlympicLocation // binds _cmp, _clone and _drop. #define i_tag OL #define i_extern // define _clist_mergesort() #include // Create a csmap where key is country name #define i_key_str // binds cstr_equ, cstr_hash, cstr_clone, ++ -#define i_val_class clist_OL // binds clist_OL_clone, clist_OL_drop +#define i_valclass clist_OL // binds clist_OL_clone, clist_OL_drop #define i_tag OL #include diff --git a/examples/music_arc.c b/examples/music_arc.c index 0fb0dd70..162c4c2f 100644 --- a/examples/music_arc.c +++ b/examples/music_arc.c @@ -21,13 +21,13 @@ void Song_drop(Song* s) { // Define the reference counted type #define i_type SongArc -#define i_val_class Song +#define i_valclass Song #define i_opt c_no_hash #include // ... and a vector of it #define i_type SongVec -#define i_val_arcbox SongArc +#define i_valboxed SongArc #include void example3() diff --git a/examples/new_sptr.c b/examples/new_sptr.c index c4c9f7f5..2c6b28d6 100644 --- a/examples/new_sptr.c +++ b/examples/new_sptr.c @@ -8,7 +8,7 @@ int Person_cmp(const Person* a, const Person* b); uint64_t Person_hash(const Person* p); #define i_type PersonArc -#define i_val_class Person // "class" ensure Person_drop will be called +#define i_valclass Person // "class" ensure Person_drop will be called #define i_cmp Person_cmp // enable carc object comparisons (not ptr to obj) #define i_hash Person_hash // enable carc object hash (not ptr to obj) #include @@ -19,11 +19,11 @@ uint64_t Person_hash(const Person* p); #include #define i_type IPStack -#define i_val_arcbox IPtr +#define i_valboxed IPtr #include #define i_type PASet -#define i_val_arcbox PersonArc +#define i_valboxed PersonArc #include diff --git a/examples/person_arc.c b/examples/person_arc.c index 26bdd44d..a7bf2a6f 100644 --- a/examples/person_arc.c +++ b/examples/person_arc.c @@ -28,12 +28,12 @@ void Person_drop(Person* p) { } #define i_type PSPtr -#define i_val_class Person // ensure Person_drop +#define i_valclass Person // ensure Person_drop #define i_cmp Person_cmp // specify object cmp, instead of ptr cmp for arc. #include #define i_type Persons -#define i_val_arcbox PSPtr // binds PSPtr_cmp, PSPtr_drop... +#define i_valboxed PSPtr // binds PSPtr_cmp, PSPtr_drop... #include diff --git a/examples/rawptr_elements.c b/examples/rawptr_elements.c index bae314fd..095357ca 100644 --- a/examples/rawptr_elements.c +++ b/examples/rawptr_elements.c @@ -23,7 +23,7 @@ typedef int64_t inttype; #define i_type SIBoxMap #define i_key_str -#define i_val_arcbox IBox +#define i_valboxed IBox #include int main() diff --git a/examples/vikings.c b/examples/vikings.c index 1cfcf72e..fc73f438 100644 --- a/examples/vikings.c +++ b/examples/vikings.c @@ -32,7 +32,7 @@ static inline RViking Viking_toraw(const Viking* vp) { // With this in place, we define the Viking => int hash map type: #define i_type Vikings -#define i_key_class Viking // key type +#define i_keyclass Viking // key type #define i_keyraw RViking // lookup type #define i_keyfrom Viking_from #define i_opt c_no_clone @@ -40,7 +40,7 @@ static inline RViking Viking_toraw(const Viking* vp) { #define i_val int // mapped type #include /* - i_key_class implies these defines, unless they are already defined: + i_keyclass implies these defines, unless they are already defined: i_cmp => RViking_cmp //i_hash => RViking_hash // already defined. //i_keyclone => Viking_clone // not used, because of c_no_clone diff --git a/include/stc/carc.h b/include/stc/carc.h index 882acb6b..e061aa2c 100644 --- a/include/stc/carc.h +++ b/include/stc/carc.h @@ -78,10 +78,10 @@ int main() { #ifndef _i_prefix #define _i_prefix carc_ #endif -#if !(defined i_cmp || defined i_less || defined i_key_class || defined i_val_class) +#if !(defined i_cmp || defined i_less || defined i_keyclass || defined i_valclass) #define _i_no_cmp #endif -#if !(defined i_eq || defined i_hash || defined i_key_class || defined i_val_class) +#if !(defined i_eq || defined i_hash || defined i_keyclass || defined i_valclass) #define _i_no_hash #endif #include "template.h" diff --git a/include/stc/cbox.h b/include/stc/cbox.h index dde0ed08..dc7b76ba 100644 --- a/include/stc/cbox.h +++ b/include/stc/cbox.h @@ -40,7 +40,7 @@ void Person_drop(Person* p) { c_drop(cstr, &p->name, &p->email); } -#define i_key_class Person // bind Person clone+drop fn's +#define i_keyclass Person // bind Person clone+drop fn's #define i_type PBox #include @@ -70,10 +70,10 @@ int main() { #ifndef _i_prefix #define _i_prefix cbox_ #endif -#if !(defined i_cmp || defined i_less || defined i_key_class || defined i_val_class) +#if !(defined i_cmp || defined i_less || defined i_keyclass || defined i_valclass) #define _i_no_cmp #endif -#if !(defined i_eq || defined i_hash || defined i_key_class || defined i_val_class) +#if !(defined i_eq || defined i_hash || defined i_keyclass || defined i_valclass) #define _i_no_hash #endif #include "template.h" diff --git a/include/stc/template.h b/include/stc/template.h index e7b6dfdc..eb114fe7 100644 --- a/include/stc/template.h +++ b/include/stc/template.h @@ -57,15 +57,8 @@ #error "i_valfrom defined without i_valraw" #endif -#ifdef i_key_bind // [deprecated] - #define i_key_class i_key_bind -#endif -#ifdef i_val_bind // [deprecated] - #define i_val_class i_val_bind -#endif - #if !(defined i_key || defined i_key_str || defined i_key_ssv || \ - defined i_key_class || defined i_key_arcbox) + defined i_keyclass || defined i_keyboxed) #if defined _i_ismap #error "i_key* must be defined for maps." #endif @@ -76,11 +69,11 @@ #if defined i_val_ssv #define i_key_ssv i_val_ssv #endif - #if defined i_val_arcbox - #define i_key_arcbox i_val_arcbox + #if defined i_valboxed + #define i_keyboxed i_valboxed #endif - #if defined i_val_class - #define i_key_class i_val_class + #if defined i_valclass + #define i_keyclass i_valclass #endif #if defined i_val #define i_key i_val @@ -110,14 +103,14 @@ #endif #if defined i_key_str - #define i_key_class cstr + #define i_keyclass cstr #define i_keyraw crawstr #define i_keyfrom cstr_from #ifndef i_tag #define i_tag str #endif #elif defined i_key_ssv - #define i_key_class cstr + #define i_keyclass cstr #define i_keyraw csview #define i_keyfrom cstr_from_sv #define i_keyto cstr_sv @@ -125,17 +118,17 @@ #ifndef i_tag #define i_tag ssv #endif -#elif defined i_key_arcbox - #define i_key_class i_key_arcbox - #define i_keyraw c_paste(i_key_arcbox, _raw) - #define i_keyfrom c_paste(i_key_arcbox, _new) +#elif defined i_keyboxed + #define i_keyclass i_keyboxed + #define i_keyraw c_paste(i_keyboxed, _raw) + #define i_keyfrom c_paste(i_keyboxed, _new) #if !defined _i_no_hash - #define i_eq c_paste(i_key_arcbox, _raw_eq) + #define i_eq c_paste(i_keyboxed, _raw_eq) #endif #endif -#ifdef i_key_class - #define i_key i_key_class +#ifdef i_keyclass + #define i_key i_keyclass #ifndef i_keyclone #define i_keyclone c_paste(i_key, _clone) #endif @@ -211,22 +204,22 @@ #if defined _i_ismap // ---- process cmap/csmap value i_val, ... ---- #ifdef i_val_str - #define i_val_class cstr + #define i_valclass cstr #define i_valraw crawstr #define i_valfrom cstr_from #elif defined i_val_ssv - #define i_val_class cstr + #define i_valclass cstr #define i_valraw csview #define i_valfrom cstr_from_sv #define i_valto cstr_sv -#elif defined i_val_arcbox - #define i_val_class i_val_arcbox - #define i_valraw c_paste(i_val_arcbox, _raw) - #define i_valfrom c_paste(i_val_arcbox, _new) +#elif defined i_valboxed + #define i_valclass i_valboxed + #define i_valraw c_paste(i_valboxed, _raw) + #define i_valfrom c_paste(i_valboxed, _new) #endif -#ifdef i_val_class - #define i_val i_val_class +#ifdef i_valclass + #define i_val i_valclass #ifndef i_valclone #define i_valclone c_paste(i_val, _clone) #endif @@ -291,9 +284,8 @@ #undef i_val #undef i_val_str #undef i_val_ssv -#undef i_val_arcbox -#undef i_val_class -#undef i_val_bind // [deprecated] +#undef i_valboxed +#undef i_valclass #undef i_valraw #undef i_valclone #undef i_valfrom @@ -303,9 +295,8 @@ #undef i_key #undef i_key_str #undef i_key_ssv -#undef i_key_arcbox -#undef i_key_class -#undef i_key_bind // [deprecated] +#undef i_keyboxed +#undef i_keyclass #undef i_keyraw #undef i_keyclone #undef i_keyfrom -- cgit v1.2.3