-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #468 from hpyproject/topic/GR-51605
Enable slot HPy_tp_descr_get.
- Loading branch information
Showing
9 changed files
with
171 additions
and
38 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
HPy Lists and Tuples | ||
==================== | ||
|
||
Building Tuples and Lists | ||
------------------------- | ||
|
||
.. autocmodule:: autogen/public_api.h | ||
:members: HPyTupleBuilder_New,HPyTupleBuilder_Set,HPyTupleBuilder_Build,HPyTupleBuilder_Cancel | ||
|
||
.. autocmodule:: autogen/public_api.h | ||
:members: HPyListBuilder_New,HPyListBuilder_Set,HPyListBuilder_Build,HPyListBuilder_Cancel | ||
|
||
Tuples | ||
------ | ||
|
||
.. autocmodule:: autogen/public_api.h | ||
:members: HPyTuple_Check,HPyTuple_FromArray | ||
|
||
Lists | ||
----- | ||
|
||
.. autocmodule:: autogen/public_api.h | ||
:members: HPyList_Check,HPyList_New,HPyList_Append,HPyList_Insert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pycparser | ||
from packaging import version | ||
|
||
if version.parse(pycparser.__version__) < version.parse('2.21'): | ||
raise ImportError('You need pycparser>=2.21 to run autogen') | ||
|
||
from .parse import HPyAPI, AUTOGEN_H | ||
|
||
|
||
def generate(generators, *gen_args): | ||
""" | ||
Takes a sequence of autogen generators that will have access to the parse | ||
tree of 'public_api.c' and can then generate files or whatever. | ||
:param generators: A sequence (e.g. tuple) of classes or callables that | ||
will produce objects with a 'write' method. The 'gen_args' will be passed | ||
to the 'write' method on invocation. | ||
:param gen_args: Arguments for the autogen generator instances. | ||
""" | ||
api = HPyAPI.parse(AUTOGEN_H) | ||
for cls in generators: | ||
cls(api).write(*gen_args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters