File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,12 +84,6 @@ cdef extern from "pkgcraft.h":
8484 REPO_FORMAT_FAKE,
8585 REPO_FORMAT_EMPTY,
8686
87- # Repo set types registered in the config object.
88- cdef enum Repos:
89- REPOS_ALL,
90- REPOS_EBUILD,
91- REPOS_CONFIGURED,
92-
9387 # Generic set operations.
9488 cdef enum SetOp:
9589 SET_OP_AND,
@@ -331,11 +325,13 @@ cdef extern from "pkgcraft.h":
331325 # The config argument must be a non-null Config pointer.
332326 const Repo ** pkgcraft_config_repos(Config * c, uintptr_t * len )
333327
334- # Return the RepoSet for a given set type.
328+ # Return the RepoSet for a given repo format.
329+ #
330+ # Use a null pointer format argument to return the set of all repos.
335331 #
336332 # # Safety
337333 # The config argument must be a non-null Config pointer.
338- RepoSet * pkgcraft_config_repos_set(Config * c, Repos kind )
334+ RepoSet * pkgcraft_config_repos_set(Config * c, const RepoFormat * format )
339335
340336 # Get the category of a Cpv object.
341337 #
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ cdef class Repos(Indirect):
143143 RepoSet:
144144 """
145145 if self ._all is None :
146- ptr = C.pkgcraft_config_repos_set(self .ptr, C.REPOS_ALL )
146+ ptr = C.pkgcraft_config_repos_set(self .ptr, NULL )
147147 self ._all = RepoSet.from_ptr(ptr)
148148 return self ._all
149149
@@ -154,8 +154,9 @@ cdef class Repos(Indirect):
154154 Returns:
155155 RepoSet:
156156 """
157+ cdef C.RepoFormat fmt = C.REPO_FORMAT_EBUILD
157158 if self ._ebuild is None :
158- ptr = C.pkgcraft_config_repos_set(self .ptr, C.REPOS_EBUILD )
159+ ptr = C.pkgcraft_config_repos_set(self .ptr, & fmt )
159160 self ._ebuild = RepoSet.from_ptr(ptr)
160161 return self ._ebuild
161162
@@ -166,8 +167,9 @@ cdef class Repos(Indirect):
166167 Returns:
167168 RepoSet:
168169 """
170+ cdef C.RepoFormat fmt = C.REPO_FORMAT_CONFIGURED
169171 if self ._configured is None :
170- ptr = C.pkgcraft_config_repos_set(self .ptr, C.REPOS_CONFIGURED )
172+ ptr = C.pkgcraft_config_repos_set(self .ptr, & fmt )
171173 self ._configured = RepoSet.from_ptr(ptr)
172174 return self ._configured
173175
You can’t perform that action at this time.
0 commit comments