Skip to content

Macro declarations #1529

@videlec

Description

@videlec

When parsing .rst files to produce Cython .pxd files (as in sagemath/sage#36449) I would like to also be able to parse macros. However, Cython is completely agnostic to macros that must be defined as functions. Would it be fine to do changes in the flint doc such as

diff --git a/doc/source/acb_mat.rst b/doc/source/acb_mat.rst
index 5d18fd0f3..3240d0260 100644
--- a/doc/source/acb_mat.rst
+++ b/doc/source/acb_mat.rst
@@ -38,15 +38,15 @@ Types, macros and constants
     *acb_mat_struct*, permitting an *acb_mat_t* to
     be passed by reference.
 
-.. macro:: acb_mat_entry(mat, i, j)
+.. macro:: acb_ptr acb_mat_entry(acb_mat_t mat, slong i, slong j)
 
     Macro giving a pointer to the entry at row *i* and column *j*.
 
-.. macro:: acb_mat_nrows(mat)
+.. macro:: slong acb_mat_nrows(acb_mat_t mat)
 
     Returns the number of rows of the matrix.
 
-.. macro:: acb_mat_ncols(mat)
+.. macro:: slong acb_mat_ncols(acb_mat_t mat)
 
     Returns the number of columns of the matrix.

(where appropriate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions