Re: [PATCH bpf-next 1/2] bpftool: add C++-specific open/load/etc skeleton wrappers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 11, 2022 at 3:16 PM Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Fri, Feb 11, 2022 at 02:50:06PM -0800, Andrii Nakryiko wrote:
> >               }                                                           \n\
> >                                                                           \n\
> > -             #endif /* %s */                                             \n\
> > +             #ifdef __cplusplus                                          \n\
> > +             struct %1$s *%1$s::open() { return %1$s__open(); }          \n\
> > +             struct %1$s *%1$s::open(const struct bpf_object_open_opts *opts) { return %1$s__open_opts(opts); }\n\
>
> Why two methods? instead of "opts = nullptr" ?

Because my C++ is rusty :) I'll drop no-arg version in v2.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux