Dushistov / flapigen-rs

Tool for connecting programs or libraries written in Rust with other languages
BSD 3-Clause "New" or "Revised" License
775 stars 59 forks source link

Invalid string "conversation" instead of "conversion". #417

Closed stephan57160 closed 2 years ago

stephan57160 commented 2 years ago

When I generate the code found from the examples in the doc, I observe the following code in c_Foo.h :

#ifdef __cplusplus
static_assert(sizeof(uintptr_t) == sizeof(uint8_t) * 8,
   "our conversation usize <-> uintptr_t is wrong");
extern "C" {
#endif

Instead of "our conversation usize <-> uintptr_t is wrong"); it should be "our conversion usize <-> uintptr_t is wrong"); no ?

Found in 2 places in .rs source code :

find . -type f | xargs grep 'our conversa'
./macroslib/src/cpp/fclass.rs:   "our conversation usize <-> uintptr_t is wrong");
./macroslib/src/cpp/mod.rs:   "our conversation usize <-> uintptr_t is wrong");

I'll raise a PR soon for the same minor buggy message.

stephan57160 commented 2 years ago

Hmmm... I did not realize this earlier, but there are plenty of conversations in the source tree.

$ find flapigen-rs -type f | xargs grep -i 'conversation' | wc -l
169
$ 
stephan57160 commented 2 years ago

PR fixed to replace all conversation to conversion, with a couple of SED calls.