Skip to content

Commit d17af8b

Browse files
committed
[GR-24830] Update to HPy revision 1ee0fcc.
PullRequest: graalpython/1276
2 parents f8f9279 + a9b4735 commit d17af8b

File tree

122 files changed

+11393
-1308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+11393
-1308
lines changed

graalpython/com.oracle.graal.python.cext/hpy/hpy.c

Lines changed: 356 additions & 15 deletions
Large diffs are not rendered by default.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/* MIT License
2+
*
3+
* Copyright (c) 2020, Oracle and/or its affiliates.
4+
* Copyright (c) 2019 pyhandle
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
/*
26+
DO NOT EDIT THIS FILE!
27+
28+
This file is automatically generated by tools/autogen.py from tools/public_api.h.
29+
Run this to regenerate:
30+
make autogen
31+
32+
*/
33+
34+
#define _HPyFunc_DECLARE_HPyFunc_NOARGS(SYM) static HPy SYM(HPyContext ctx, HPy self)
35+
#define _HPyFunc_DECLARE_HPyFunc_O(SYM) static HPy SYM(HPyContext ctx, HPy self, HPy arg)
36+
#define _HPyFunc_DECLARE_HPyFunc_VARARGS(SYM) static HPy SYM(HPyContext ctx, HPy self, HPy *args, HPy_ssize_t nargs)
37+
#define _HPyFunc_DECLARE_HPyFunc_KEYWORDS(SYM) static HPy SYM(HPyContext ctx, HPy self, HPy *args, HPy_ssize_t nargs, HPy kw)
38+
#define _HPyFunc_DECLARE_HPyFunc_UNARYFUNC(SYM) static HPy SYM(HPyContext ctx, HPy)
39+
#define _HPyFunc_DECLARE_HPyFunc_BINARYFUNC(SYM) static HPy SYM(HPyContext ctx, HPy, HPy)
40+
#define _HPyFunc_DECLARE_HPyFunc_TERNARYFUNC(SYM) static HPy SYM(HPyContext ctx, HPy, HPy, HPy)
41+
#define _HPyFunc_DECLARE_HPyFunc_INQUIRY(SYM) static int SYM(HPyContext ctx, HPy)
42+
#define _HPyFunc_DECLARE_HPyFunc_LENFUNC(SYM) static HPy_ssize_t SYM(HPyContext ctx, HPy)
43+
#define _HPyFunc_DECLARE_HPyFunc_SSIZEARGFUNC(SYM) static HPy SYM(HPyContext ctx, HPy, HPy_ssize_t)
44+
#define _HPyFunc_DECLARE_HPyFunc_SSIZESSIZEARGFUNC(SYM) static HPy SYM(HPyContext ctx, HPy, HPy_ssize_t, HPy_ssize_t)
45+
#define _HPyFunc_DECLARE_HPyFunc_SSIZEOBJARGPROC(SYM) static int SYM(HPyContext ctx, HPy, HPy_ssize_t, HPy)
46+
#define _HPyFunc_DECLARE_HPyFunc_SSIZESSIZEOBJARGPROC(SYM) static int SYM(HPyContext ctx, HPy, HPy_ssize_t, HPy_ssize_t, HPy)
47+
#define _HPyFunc_DECLARE_HPyFunc_OBJOBJARGPROC(SYM) static int SYM(HPyContext ctx, HPy, HPy, HPy)
48+
#define _HPyFunc_DECLARE_HPyFunc_FREEFUNC(SYM) static void SYM(HPyContext ctx, void *)
49+
#define _HPyFunc_DECLARE_HPyFunc_GETATTRFUNC(SYM) static HPy SYM(HPyContext ctx, HPy, char *)
50+
#define _HPyFunc_DECLARE_HPyFunc_GETATTROFUNC(SYM) static HPy SYM(HPyContext ctx, HPy, HPy)
51+
#define _HPyFunc_DECLARE_HPyFunc_SETATTRFUNC(SYM) static int SYM(HPyContext ctx, HPy, char *, HPy)
52+
#define _HPyFunc_DECLARE_HPyFunc_SETATTROFUNC(SYM) static int SYM(HPyContext ctx, HPy, HPy, HPy)
53+
#define _HPyFunc_DECLARE_HPyFunc_REPRFUNC(SYM) static HPy SYM(HPyContext ctx, HPy)
54+
#define _HPyFunc_DECLARE_HPyFunc_HASHFUNC(SYM) static HPy_hash_t SYM(HPyContext ctx, HPy)
55+
#define _HPyFunc_DECLARE_HPyFunc_RICHCMPFUNC(SYM) static HPy SYM(HPyContext ctx, HPy, HPy, int)
56+
#define _HPyFunc_DECLARE_HPyFunc_GETITERFUNC(SYM) static HPy SYM(HPyContext ctx, HPy)
57+
#define _HPyFunc_DECLARE_HPyFunc_ITERNEXTFUNC(SYM) static HPy SYM(HPyContext ctx, HPy)
58+
#define _HPyFunc_DECLARE_HPyFunc_DESCRGETFUNC(SYM) static HPy SYM(HPyContext ctx, HPy, HPy, HPy)
59+
#define _HPyFunc_DECLARE_HPyFunc_DESCRSETFUNC(SYM) static int SYM(HPyContext ctx, HPy, HPy, HPy)
60+
#define _HPyFunc_DECLARE_HPyFunc_INITPROC(SYM) static int SYM(HPyContext ctx, HPy self, HPy *args, HPy_ssize_t nargs, HPy kw)
61+
#define _HPyFunc_DECLARE_HPyFunc_GETTER(SYM) static HPy SYM(HPyContext ctx, HPy, void *)
62+
#define _HPyFunc_DECLARE_HPyFunc_SETTER(SYM) static int SYM(HPyContext ctx, HPy, HPy, void *)
63+
#define _HPyFunc_DECLARE_HPyFunc_DESTROYFUNC(SYM) static void SYM(void *)
64+
65+
typedef HPy (*HPyFunc_noargs)(HPyContext ctx, HPy self);
66+
typedef HPy (*HPyFunc_o)(HPyContext ctx, HPy self, HPy arg);
67+
typedef HPy (*HPyFunc_varargs)(HPyContext ctx, HPy self, HPy *args, HPy_ssize_t nargs);
68+
typedef HPy (*HPyFunc_keywords)(HPyContext ctx, HPy self, HPy *args, HPy_ssize_t nargs, HPy kw);
69+
typedef HPy (*HPyFunc_unaryfunc)(HPyContext ctx, HPy);
70+
typedef HPy (*HPyFunc_binaryfunc)(HPyContext ctx, HPy, HPy);
71+
typedef HPy (*HPyFunc_ternaryfunc)(HPyContext ctx, HPy, HPy, HPy);
72+
typedef int (*HPyFunc_inquiry)(HPyContext ctx, HPy);
73+
typedef HPy_ssize_t (*HPyFunc_lenfunc)(HPyContext ctx, HPy);
74+
typedef HPy (*HPyFunc_ssizeargfunc)(HPyContext ctx, HPy, HPy_ssize_t);
75+
typedef HPy (*HPyFunc_ssizessizeargfunc)(HPyContext ctx, HPy, HPy_ssize_t, HPy_ssize_t);
76+
typedef int (*HPyFunc_ssizeobjargproc)(HPyContext ctx, HPy, HPy_ssize_t, HPy);
77+
typedef int (*HPyFunc_ssizessizeobjargproc)(HPyContext ctx, HPy, HPy_ssize_t, HPy_ssize_t, HPy);
78+
typedef int (*HPyFunc_objobjargproc)(HPyContext ctx, HPy, HPy, HPy);
79+
typedef void (*HPyFunc_freefunc)(HPyContext ctx, void *);
80+
typedef HPy (*HPyFunc_getattrfunc)(HPyContext ctx, HPy, char *);
81+
typedef HPy (*HPyFunc_getattrofunc)(HPyContext ctx, HPy, HPy);
82+
typedef int (*HPyFunc_setattrfunc)(HPyContext ctx, HPy, char *, HPy);
83+
typedef int (*HPyFunc_setattrofunc)(HPyContext ctx, HPy, HPy, HPy);
84+
typedef HPy (*HPyFunc_reprfunc)(HPyContext ctx, HPy);
85+
typedef HPy_hash_t (*HPyFunc_hashfunc)(HPyContext ctx, HPy);
86+
typedef HPy (*HPyFunc_richcmpfunc)(HPyContext ctx, HPy, HPy, int);
87+
typedef HPy (*HPyFunc_getiterfunc)(HPyContext ctx, HPy);
88+
typedef HPy (*HPyFunc_iternextfunc)(HPyContext ctx, HPy);
89+
typedef HPy (*HPyFunc_descrgetfunc)(HPyContext ctx, HPy, HPy, HPy);
90+
typedef int (*HPyFunc_descrsetfunc)(HPyContext ctx, HPy, HPy, HPy);
91+
typedef int (*HPyFunc_initproc)(HPyContext ctx, HPy self, HPy *args, HPy_ssize_t nargs, HPy kw);
92+
typedef HPy (*HPyFunc_getter)(HPyContext ctx, HPy, void *);
93+
typedef int (*HPyFunc_setter)(HPyContext ctx, HPy, HPy, void *);
94+
typedef void (*HPyFunc_destroyfunc)(void *);
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/* MIT License
2+
*
3+
* Copyright (c) 2020, Oracle and/or its affiliates.
4+
* Copyright (c) 2019 pyhandle
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
/*
26+
DO NOT EDIT THIS FILE!
27+
28+
This file is automatically generated by tools/autogen.py from tools/public_api.h.
29+
Run this to regenerate:
30+
make autogen
31+
32+
*/
33+
34+
typedef enum {
35+
HPy_nb_absolute = 6,
36+
HPy_nb_add = 7,
37+
HPy_nb_and = 8,
38+
HPy_nb_bool = 9,
39+
HPy_nb_divmod = 10,
40+
HPy_nb_float = 11,
41+
HPy_nb_floor_divide = 12,
42+
HPy_nb_index = 13,
43+
HPy_nb_inplace_add = 14,
44+
HPy_nb_inplace_and = 15,
45+
HPy_nb_inplace_floor_divide = 16,
46+
HPy_nb_inplace_lshift = 17,
47+
HPy_nb_inplace_multiply = 18,
48+
HPy_nb_inplace_or = 19,
49+
HPy_nb_inplace_power = 20,
50+
HPy_nb_inplace_remainder = 21,
51+
HPy_nb_inplace_rshift = 22,
52+
HPy_nb_inplace_subtract = 23,
53+
HPy_nb_inplace_true_divide = 24,
54+
HPy_nb_inplace_xor = 25,
55+
HPy_nb_int = 26,
56+
HPy_nb_invert = 27,
57+
HPy_nb_lshift = 28,
58+
HPy_nb_multiply = 29,
59+
HPy_nb_negative = 30,
60+
HPy_nb_or = 31,
61+
HPy_nb_positive = 32,
62+
HPy_nb_power = 33,
63+
HPy_nb_remainder = 34,
64+
HPy_nb_rshift = 35,
65+
HPy_nb_subtract = 36,
66+
HPy_nb_true_divide = 37,
67+
HPy_nb_xor = 38,
68+
HPy_sq_item = 44,
69+
HPy_sq_length = 45,
70+
HPy_tp_init = 60,
71+
HPy_tp_new = 65,
72+
HPy_tp_repr = 66,
73+
HPy_nb_matrix_multiply = 75,
74+
HPy_nb_inplace_matrix_multiply = 76,
75+
HPy_tp_destroy = 1000,
76+
} HPySlot_Slot;
77+
78+
#define _HPySlot_SIG__HPy_nb_absolute HPyFunc_UNARYFUNC
79+
#define _HPySlot_SIG__HPy_nb_add HPyFunc_BINARYFUNC
80+
#define _HPySlot_SIG__HPy_nb_and HPyFunc_BINARYFUNC
81+
#define _HPySlot_SIG__HPy_nb_bool HPyFunc_INQUIRY
82+
#define _HPySlot_SIG__HPy_nb_divmod HPyFunc_BINARYFUNC
83+
#define _HPySlot_SIG__HPy_nb_float HPyFunc_UNARYFUNC
84+
#define _HPySlot_SIG__HPy_nb_floor_divide HPyFunc_BINARYFUNC
85+
#define _HPySlot_SIG__HPy_nb_index HPyFunc_UNARYFUNC
86+
#define _HPySlot_SIG__HPy_nb_inplace_add HPyFunc_BINARYFUNC
87+
#define _HPySlot_SIG__HPy_nb_inplace_and HPyFunc_BINARYFUNC
88+
#define _HPySlot_SIG__HPy_nb_inplace_floor_divide HPyFunc_BINARYFUNC
89+
#define _HPySlot_SIG__HPy_nb_inplace_lshift HPyFunc_BINARYFUNC
90+
#define _HPySlot_SIG__HPy_nb_inplace_multiply HPyFunc_BINARYFUNC
91+
#define _HPySlot_SIG__HPy_nb_inplace_or HPyFunc_BINARYFUNC
92+
#define _HPySlot_SIG__HPy_nb_inplace_power HPyFunc_TERNARYFUNC
93+
#define _HPySlot_SIG__HPy_nb_inplace_remainder HPyFunc_BINARYFUNC
94+
#define _HPySlot_SIG__HPy_nb_inplace_rshift HPyFunc_BINARYFUNC
95+
#define _HPySlot_SIG__HPy_nb_inplace_subtract HPyFunc_BINARYFUNC
96+
#define _HPySlot_SIG__HPy_nb_inplace_true_divide HPyFunc_BINARYFUNC
97+
#define _HPySlot_SIG__HPy_nb_inplace_xor HPyFunc_BINARYFUNC
98+
#define _HPySlot_SIG__HPy_nb_int HPyFunc_UNARYFUNC
99+
#define _HPySlot_SIG__HPy_nb_invert HPyFunc_UNARYFUNC
100+
#define _HPySlot_SIG__HPy_nb_lshift HPyFunc_BINARYFUNC
101+
#define _HPySlot_SIG__HPy_nb_multiply HPyFunc_BINARYFUNC
102+
#define _HPySlot_SIG__HPy_nb_negative HPyFunc_UNARYFUNC
103+
#define _HPySlot_SIG__HPy_nb_or HPyFunc_BINARYFUNC
104+
#define _HPySlot_SIG__HPy_nb_positive HPyFunc_UNARYFUNC
105+
#define _HPySlot_SIG__HPy_nb_power HPyFunc_TERNARYFUNC
106+
#define _HPySlot_SIG__HPy_nb_remainder HPyFunc_BINARYFUNC
107+
#define _HPySlot_SIG__HPy_nb_rshift HPyFunc_BINARYFUNC
108+
#define _HPySlot_SIG__HPy_nb_subtract HPyFunc_BINARYFUNC
109+
#define _HPySlot_SIG__HPy_nb_true_divide HPyFunc_BINARYFUNC
110+
#define _HPySlot_SIG__HPy_nb_xor HPyFunc_BINARYFUNC
111+
#define _HPySlot_SIG__HPy_sq_item HPyFunc_SSIZEARGFUNC
112+
#define _HPySlot_SIG__HPy_sq_length HPyFunc_LENFUNC
113+
#define _HPySlot_SIG__HPy_tp_init HPyFunc_INITPROC
114+
#define _HPySlot_SIG__HPy_tp_new HPyFunc_KEYWORDS
115+
#define _HPySlot_SIG__HPy_tp_repr HPyFunc_REPRFUNC
116+
#define _HPySlot_SIG__HPy_nb_matrix_multiply HPyFunc_BINARYFUNC
117+
#define _HPySlot_SIG__HPy_nb_inplace_matrix_multiply HPyFunc_BINARYFUNC
118+
#define _HPySlot_SIG__HPy_tp_destroy HPyFunc_DESTROYFUNC

0 commit comments

Comments
 (0)