repo.or.cz
/
gecko.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Backed out 5 changesets (bug 1890092, bug 1888683) for causing build bustages & crash...
[gecko.git]
/
third_party
/
rust
/
uniffi_bindgen
/
src
/
bindings
/
python
/
templates
/
BooleanHelper.py
blob
6775e9e132e146c0dfa8aad28726069e86e3c040
1
class
_UniffiConverterBool
(
_UniffiConverterPrimitive
):
2
@classmethod
3
def
check
(
cls
,
value
):
4
return not not
value
5
6
@classmethod
7
def
read
(
cls
,
buf
):
8
return
cls
.
lift
(
buf
.
read_u8
())
9
10
@classmethod
11
def
write_unchecked
(
cls
,
value
,
buf
):
12
buf
.
write_u8
(
value
)
13
14
@staticmethod
15
def
lift
(
value
):
16
return
value
!=
0