Skip to content

Commit

Permalink
Auto merge of rust-lang#287 - fiveop:CONVENTIONS2, r=kamalmarhubi
Browse files Browse the repository at this point in the history
A few additions to the CONVENTIONS file
  • Loading branch information
homu committed Feb 29, 2016
2 parents da2cb87 + 3835777 commit 56398d8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@ of either, feel free to remedy the flaw by opening a pull request with
appropriate changes or additions.


## Integer Constants
## libc constants, functions and structs

We do not define integer constants ourselves, but use or reexport them from the
[libc crate][libc].

We use the functions exported from [libc][libc] instead of writing our own
`extern` declarations.

We use the `struct` definitions from [libc][libc] internally instead of writing
our own.

## Bitflags

We represent sets of constants that are intended to be combined using bitwise
operations as parameters to functions by types defined using the `bitflags!`
macro from the [bitflags crate][bitflags].
We name the type for a set of constants whose element's names start with `FOO_`
`FooFlags`.


## Enumerations
Expand Down

0 comments on commit 56398d8

Please sign in to comment.