File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed
Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,12 @@ cdef extern from "pkgcraft.h":
9595 SLOT_OPERATOR_EQUAL # = 1,
9696 SLOT_OPERATOR_STAR,
9797
98+ # Package USE dependency type.
99+ cdef enum UseDepKind:
100+ USE_DEP_KIND_ENABLED,
101+ USE_DEP_KIND_EQUAL,
102+ USE_DEP_KIND_CONDITIONAL,
103+
98104 # System config
99105 cdef struct Config:
100106 pass
@@ -193,22 +199,11 @@ cdef extern from "pkgcraft.h":
193199 cdef struct Version:
194200 pass
195201
196- # Package USE dependency type.
197- cdef enum UseDepKind_Tag:
198- USE_DEP_KIND_ENABLED,
199- USE_DEP_KIND_EQUAL,
200- USE_DEP_KIND_CONDITIONAL,
201-
202- cdef struct UseDepKind:
203- UseDepKind_Tag tag
204- bool enabled
205- bool equal
206- bool conditional
207-
208202 # C-compatible wrapper for pkgcraft::dep::UseDep.
209203 cdef struct UseDep:
210- UseDepKind kind
211204 char * flag
205+ UseDepKind kind
206+ bool enabled
212207 bool * default_
213208 UseDepWrapper * dep
214209
Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ cdef class UseDep:
6969 if inst is None :
7070 inst = < UseDep> UseDep.__new__ (UseDep)
7171 inst.ptr = < C.UseDep * > ptr
72- inst.kind = UseDepKind(ptr.kind.tag )
73- inst.enabled = ptr.kind. enabled
72+ inst.kind = UseDepKind(ptr.kind)
73+ inst.enabled = ptr.enabled
7474 inst.flag = ptr.flag.decode()
7575 if ptr.default_ is NULL :
7676 inst.default_ = None
You can’t perform that action at this time.
0 commit comments