Skip to content

Commit c92cb82

Browse files
committed
bindings: fix header name for gr_domains
1 parent 9976851 commit c92cb82

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

bin/rst_to_pxd.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
c_types = set(["void", "char", "short", "long", "int", "float", "double"])
5353
type_modifers = re.compile(r"\*|(\bconst\b)|(\bunsigned\b)|(\bsigned\b)")
5454
import_dict = {}
55+
# gr_domains.rst lists functions that are in gr.h
56+
doc_to_header = {'flint/gr_domains': 'flint/gr'}
57+
5558

5659
def get_cython_struct_types(file):
5760
"""
@@ -174,7 +177,9 @@ def generate_pxd_file(h_name, opts):
174177
fill_import_dict(opts.flint_lib_dir)
175178
l=[]
176179
docdir = opts.arb_doc_dir
177-
name = h_name
180+
name = h_name
181+
h_name = doc_to_header.get(h_name, h_name)
182+
178183
if name[:6] == "flint/":
179184
docdir = opts.flint_doc_dir
180185
name = name[6:]

src/flint/flintlib/functions/gr_domains.pxd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ from flint.flintlib.types.gr cimport gr_ctx_t, truth_t
55
from flint.flintlib.types.mpoly cimport ordering_t
66

77

8-
# XXX: Need to fix the header from gr_domain.h to gr.h:
9-
# Needs hard-coding in rst_to_pxd.py
8+
109
cdef extern from "flint/gr.h":
1110
int gr_ctx_cmp_coercion(gr_ctx_t ctx1, gr_ctx_t ctx2)
1211
truth_t gr_ctx_is_finite(gr_ctx_t ctx)

0 commit comments

Comments
 (0)