Re: [PATCH v3 5/6] libgit: add higher-level libgit crate
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 10, 2024, 19:14 UTC
- Message-ID
- <xmqqttene2ya.fsf@gitster.g>
- In-Reply-To
- <CAFySSZBECCQafaLEv80WoK6SMovwC97-tf9gh_btPc+8OuP4NA@mail.gmail.com>
Calvin Wan <calvinwan@google.com> writes:
> However, I agree that the public interface should pass the > compilation test and your approach does that -- will reroll with those > changes and I believe that we should also fix the build.rs so that > warnings also show up during cargo build.
Thanks. I couldn't quite tell if *.c was supposed to be compilable into *.o directly (if not, then Makefile needs fixing), and I am OK, if the shim layer is only internally used, if the public.h defined all pointers as "void *".
I wasn't happy to cast "struct config_set *" between "struct libgit_config_set *" merely because one embeds the other without adding any other member. If they have to be bit-for-bit identical, shouldn't we just use the real name of the struct everywhere?
The situation might become different if you address others' comments like "why do we want allocation-only interface exposed? shoudln't it also initialize?" etc.
Thanks.