Skip to content

Commit dd04ef1

Browse files
committed
librlist: expose rlist_copy_internal() in rlist_private.h
Problem: rlist_copy_internal() is declared static which means all copy implementations must be defined directly in rlist.c. Expose rlist_copy_internal() in rlist_private.h to allow copy implementations to be placed in separate source files.
1 parent 350b7fc commit dd04ef1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/common/librlist/rlist.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,9 @@ int rlist_add_rnode (struct rlist *rl, struct rnode *n)
214214
return 0;
215215
}
216216

217-
typedef struct rnode * (*rnode_copy_f) (const struct rnode *, void *arg);
218-
219-
static struct rlist *rlist_copy_internal (const struct rlist *orig,
220-
rnode_copy_f cpfn,
221-
void *arg)
217+
struct rlist *rlist_copy_internal (const struct rlist *orig,
218+
rnode_copy_f cpfn,
219+
void *arg)
222220
{
223221
struct rnode *n;
224222
struct rlist *rl = rlist_create ();

src/common/librlist/rlist_private.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,10 @@
1313

1414
int rlist_add_rnode (struct rlist *rl, struct rnode *n);
1515

16+
typedef struct rnode * (*rnode_copy_f) (const struct rnode *, void *arg);
17+
18+
struct rlist *rlist_copy_internal (const struct rlist *orig,
19+
rnode_copy_f cpfn,
20+
void *arg);
21+
1622
#endif /* !HAVE_SCHED_RLIST_PRIVATE_H */

0 commit comments

Comments
 (0)