Skip to content

Commit c2bfb04

Browse files
jshacpu
andauthored
Apply suggestions from code review
Co-authored-by: Daniel McCarney <[email protected]>
1 parent aeb7010 commit c2bfb04

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ and forth across the FFI boundary.
7777

7878
# Helper macros
7979

80-
We have an API guideline that we always check input pointers for NULL, and
81-
return an error rather than dereferencing a NULL pointer. To help with that,
82-
we have a number of helper macros that early-return if a pointer is NULL:
83-
84-
- try_ref_from_ptr!
85-
- try_mut_from_ptr!
86-
- try_box_from_ptr!
87-
- try_clone_arc!
88-
- try_callback!
89-
- try_slice!
90-
- try_take!
91-
92-
These are defined in src/lib.rs. The `Castable` trait determines which
80+
We have an API guideline that we always check input pointers for `NULL`, and
81+
return an error rather than dereferencing a `NULL` pointer. To help with that,
82+
we have a number of helper macros that early-return if a pointer is `NULL`:
83+
84+
- `try_ref_from_ptr!`
85+
- `try_mut_from_ptr!`
86+
- `try_box_from_ptr!`
87+
- `try_clone_arc!`
88+
- `try_callback!`
89+
- `try_slice!`
90+
- `try_take!`
91+
92+
These are defined in [src/lib.rs](src/lib.rs). The `Castable` trait determines which
9393
C pointers can be cast to which Rust pointer types. These macros rely
9494
on that trait to ensure correct typing of conversions.

0 commit comments

Comments
 (0)