Skip to content

Commit a723fec

Browse files
committed
[GR-28723] Update HPy import.
PullRequest: graalpython/1578
2 parents ea37e87 + 1a94ae6 commit a723fec

File tree

30 files changed

+1506
-531
lines changed

30 files changed

+1506
-531
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ int graal_hpy_legacy_slot_get_slot(cpy_PyTypeSlot *slot) {
167167
return slot->slot;
168168
}
169169

170+
void* graal_hpy_legacy_slot_get_pfunc(cpy_PyTypeSlot *slot) {
171+
return slot->pfunc;
172+
}
173+
170174
void* graal_hpy_legacy_slot_get_methods(cpy_PyTypeSlot *slot) {
171175
uint64_t len=0;
172176
cpy_PyMethodDef *legacy_methods = (cpy_PyMethodDef *) slot->pfunc;
@@ -203,6 +207,18 @@ void* graal_hpy_legacy_slot_get_descrs(cpy_PyTypeSlot *slot) {
203207
return NULL;
204208
}
205209

210+
/* getters for legacy cpy_PyMethodDef */
211+
212+
void* graal_hpy_legacy_methoddef_get_ml_name(cpy_PyMethodDef *methodDef) {
213+
return polyglot_from_string(methodDef->ml_name, SRC_CS);
214+
}
215+
216+
/* getters for legacy cpy_PyGetSetDef */
217+
218+
void* graal_hpy_legacy_getsetdef_get_name(cpy_PyGetSetDef *getSetDef) {
219+
return polyglot_from_string(getSetDef->name, SRC_CS);
220+
}
221+
206222
/* getters for HPyDef */
207223

208224
int graal_hpy_def_get_kind(HPyDef *def) {

graalpython/com.oracle.graal.python.cext/include/common/typeslots.h

Lines changed: 0 additions & 110 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/* MIT License
2-
*
3-
* Copyright (c) 2020, 2021, Oracle and/or its affiliates.
2+
*
3+
* Copyright (c) 2020, 2021, Oracle and/or its affiliates.
44
* Copyright (c) 2019 pyhandle
5-
*
5+
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
88
* in the Software without restriction, including without limitation the rights
99
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1010
* copies of the Software, and to permit persons to whom the Software is
1111
* furnished to do so, subject to the following conditions:
12-
*
12+
*
1313
* The above copyright notice and this permission notice shall be included in all
1414
* copies or substantial portions of the Software.
15-
*
15+
*
1616
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1717
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1818
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -22,13 +22,6 @@
2222
* SOFTWARE.
2323
*/
2424

25-
/*
26-
HPy helper functions provided by the HPy runtime library.
27-
*/
28-
29-
HPyAPI_RUNTIME_FUNC(int)
30-
HPyArg_Parse(HPyContext ctx, HPy *args, HPy_ssize_t nargs, const char *fmt, ...);
31-
32-
HPyAPI_RUNTIME_FUNC(int)
33-
HPyArg_ParseKeywords(HPyContext ctx, HPy *args, HPy_ssize_t nargs, HPy kw,
34-
const char *fmt, const char *keywords[], ...);
25+
// automatically generated by setup.py:get_scm_config()
26+
#define HPY_VERSION "0.1.dev618+g2f53dbf"
27+
#define HPY_GIT_REVISION "2f53dbf"

0 commit comments

Comments
 (0)