Skip to content

Commit 20e63ec

Browse files
committed
f readme - changes from val
1 parent 084d008 commit 20e63ec

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lightning-c-bindings/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Various containers (Tuples, Vecs, Results, etc) are mapped into C structs of the
161161
`LDKCContainerType_ContainerElementsZ`. Inner fields are often pointers, and in the case of
162162
primitive types, these may be allocated in C using the system allocator. See [the Rust docs on your
163163
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
165165
`ContainerElements` part with `InnerContainerType_InnerContainerElementsZ`, eg
166166
`LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ` represents a
167167
`Result<(Signature, Vec<Signature>), ()>`.
@@ -203,8 +203,9 @@ There are a few gotchas around future changes to Rust-Lightning which the bindin
203203
These include:
204204
* Any trait method which returns a reference to a struct or inner variable cannot be called in
205205
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.
208209

209210
For example, the `ChannelKeys::pubkeys() -> &ChannelPublicKeys` function is mapped as this:
210211

@@ -224,5 +225,5 @@ valgrind, AddressSanitizer, MemorySanitizer, or other similar tools to ensure co
224225
Note that after running `genbindings.sh`, if possible, the static lib in target/debug (eg
225226
target/debug/liblightning.a) will be linked with address sanitizer. In order to build against it,
226227
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
228229
unsupported platform, a warning noting that address sanitizer is not available will be printed.

0 commit comments

Comments
 (0)