mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-16 18:50:23 +02:00
Refactor pop_handle to not take the handle
This commit is contained in:
parent
32ddaa7624
commit
7dda5b992d
4 changed files with 16 additions and 16 deletions
|
@ -7,13 +7,13 @@ struct handle {
|
|||
#define HANDLE_REF(h) h.v
|
||||
#define HANDLE_SET(h,val) do { h.v = val; } while (0)
|
||||
#define PUSH_HANDLE(cx, h) push_handle(&cx->roots, &h.handle)
|
||||
#define POP_HANDLE(cx, h) pop_handle(&cx->roots, &h.handle)
|
||||
#define POP_HANDLE(cx) pop_handle(&cx->roots)
|
||||
|
||||
static inline void push_handle(struct handle **roots, struct handle *handle) {
|
||||
handle->next = *roots;
|
||||
*roots = handle;
|
||||
}
|
||||
|
||||
static inline void pop_handle(struct handle **roots, struct handle *handle) {
|
||||
*roots = handle->next;
|
||||
static inline void pop_handle(struct handle **roots) {
|
||||
*roots = (*roots)->next;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue