Skip to content

Commit

Permalink
Rename MarkBag -> GAP_MarkBag and CollectBags -> GAP_CollectBags in
Browse files Browse the repository at this point in the history
anticipation that they will be added to the libgap API.

See gap-system/gap#3030

Refs #2
  • Loading branch information
embray committed Jan 14, 2021
1 parent df477cf commit f379d30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gappy/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ cdef void gasman_callback() with gil:
"""
global owned_objects_refcount
for obj in owned_objects_refcount:
MarkBag((<ObjWrapper>obj).value)
GAP_MarkBag((<ObjWrapper>obj).value)


############################################################################
Expand Down Expand Up @@ -999,7 +999,7 @@ cdef class Gap:
>>> gap.collect()
"""
initialize()
rc = CollectBags(0, 1)
rc = GAP_CollectBags(1)
if rc != 1:
raise RuntimeError('Garbage collection failed.')

Expand Down
7 changes: 5 additions & 2 deletions gappy/gap_includes.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ cdef extern from "gap/libgap-api.h" nogil:


cdef extern from "gap/gasman.h" nogil:
void MarkBag(Obj bag)
UInt CollectBags(UInt size, UInt full)
"""
#define GAP_CollectBags(full) CollectBags(0, full)
"""
void GAP_MarkBag "MarkBag" (Obj bag)
UInt GAP_CollectBags(UInt full)


cdef extern from "gap/io.h" nogil:
Expand Down

0 comments on commit f379d30

Please sign in to comment.