Re: Fwd: C++ libubus wrapper

2021-02-04 Thread Wojciech Jowsa
> For me, putting void * pointers everywhere is an anti-pattern which I > discourage with the way the ubus api is set up. It is a lazy way to > avoid making the code more type safe, and it adds a bit of unnecessary > bloat to data structures. Void pointer has one advantage i.e. it is portable and

Re: Fwd: C++ libubus wrapper

2021-02-04 Thread Felix Fietkau
On 2021-02-04 18:25, Wojciech Jowsa wrote: > czw., 4 lut 2021 o 10:32 Felix Fietkau napisał(a): >> >> >> On 2021-02-03 20:02, Wojciech Jowsa wrote: >> > Hi, >> > >> > I would like to write a libubus wrapper in C++. When looking into >> > ubus_method and ubus_handler_t structures I don't see a

Fwd: C++ libubus wrapper

2021-02-04 Thread Wojciech Jowsa
czw., 4 lut 2021 o 10:32 Felix Fietkau napisał(a): > > > On 2021-02-03 20:02, Wojciech Jowsa wrote: > > Hi, > > > > I would like to write a libubus wrapper in C++. When looking into > > ubus_method and ubus_handler_t structures I don't see a place where I > > could pass a this pointer. It makes

Re: C++ libubus wrapper

2021-02-04 Thread Felix Fietkau
On 2021-02-03 20:02, Wojciech Jowsa wrote: > Hi, > > I would like to write a libubus wrapper in C++. When looking into > ubus_method and ubus_handler_t structures I don't see a place where I > could pass a this pointer. It makes the handling of ubus calls in C++ > a bit complicated. > The

C++ libubus wrapper

2021-02-03 Thread Wojciech Jowsa
Hi, I would like to write a libubus wrapper in C++. When looking into ubus_method and ubus_handler_t structures I don't see a place where I could pass a this pointer. It makes the handling of ubus calls in C++ a bit complicated. The solution to that case would be adding a void pointer to the