@@ -43,7 +43,7 @@ cdef class UseDep:
4343 'use'
4444 >>> u.kind == UseDepKind.DisabledConditional
4545 True
46- >>> u.missing is None
46+ >>> u.default is None
4747 True
4848 >>> str(u)
4949 '!use?'
@@ -52,7 +52,7 @@ cdef class UseDep:
5252 'use'
5353 >>> u.kind == UseDepKind.Equal
5454 True
55- >>> u.missing == UseDepDefault.Enabled
55+ >>> u.default == UseDepDefault.Enabled
5656 True
5757 >>> str(u)
5858 'use(+)='
@@ -71,10 +71,10 @@ cdef class UseDep:
7171
7272 self .kind = UseDepKind(ptr.kind)
7373 self .flag = ptr.flag.decode()
74- if ptr.missing is NULL :
75- self .missing = None
74+ if ptr.default_ is NULL :
75+ self .default_ = None
7676 else :
77- self .missing = UseDepDefault(ptr.missing [0 ])
77+ self .default_ = UseDepDefault(ptr.default_ [0 ])
7878 self .ptr = ptr
7979
8080 @staticmethod
@@ -84,12 +84,18 @@ cdef class UseDep:
8484 inst.ptr = < C.UseDep * > ptr
8585 inst.kind = UseDepKind(ptr.kind)
8686 inst.flag = ptr.flag.decode()
87- if ptr.missing is NULL :
88- inst.missing = None
87+ if ptr.default_ is NULL :
88+ inst.default_ = None
8989 else :
90- inst.missing = UseDepDefault(ptr.missing [0 ])
90+ inst.default_ = UseDepDefault(ptr.default_ [0 ])
9191 return inst
9292
93+ # Re-export the default field using its proper name, if exposed directly via
94+ # an attribute the bindings fail to compile.
95+ @property
96+ def default (self ):
97+ return self .default_
98+
9399 def __lt__ (self , other ):
94100 if isinstance (other, UseDep):
95101 return C.pkgcraft_use_dep_cmp(self .ptr, (< UseDep> other).ptr) == - 1
0 commit comments