@@ -161,7 +161,7 @@ Various containers (Tuples, Vecs, Results, etc) are mapped into C structs of the
161
161
` LDKCContainerType_ContainerElementsZ ` . Inner fields are often pointers, and in the case of
162
162
primitive types, these may be allocated in C using the system allocator. See [ the Rust docs on your
163
163
platform's default System allocator] ( https://doc.rust-lang.org/std/alloc/struct.System.html ) for
164
- which allocator you must use. $ecursive containers are possible, and simply replace the
164
+ which allocator you must use. Recursive containers are possible, and simply replace the
165
165
` ContainerElements ` part with ` InnerContainerType_InnerContainerElementsZ ` , eg
166
166
` LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ` represents a
167
167
` Result<(Signature, Vec<Signature>), ()> ` .
@@ -203,8 +203,9 @@ There are a few gotchas around future changes to Rust-Lightning which the bindin
203
203
These include:
204
204
* Any trait method which returns a reference to a struct or inner variable cannot be called in
205
205
parallel. This is because such functions always return a local variable stored inside the trait,
206
- with a call through a function pointer to get the local variable set correctly. Such functions
207
- have comments describing the potential race conditions.
206
+ with a call through a function pointer to get the local variable set correctly. Automatically
207
+ generated setter functions have comments describing the potential race conditions in their
208
+ definition.
208
209
209
210
For example, the ` ChannelKeys::pubkeys() -> &ChannelPublicKeys ` function is mapped as this:
210
211
@@ -224,5 +225,5 @@ valgrind, AddressSanitizer, MemorySanitizer, or other similar tools to ensure co
224
225
Note that after running `genbindings.sh`, if possible, the static lib in target/debug (eg
225
226
target/debug/liblightning.a) will be linked with address sanitizer. In order to build against it,
226
227
you will need to link with `clang` with `-fsanitize=address` with the same version of LLVM as
227
- `rustc`'s LLVM. If genbindings.sh failed to find a matching `clang` or you are building on an
228
+ `rustc`'s LLVM. If ` genbindings.sh` failed to find a matching `clang` or you are building on an
228
229
unsupported platform, a warning noting that address sanitizer is not available will be printed.
0 commit comments