Skip to content

Commit cfa56dc

Browse files
fangerertimfel
authored andcommitted
Adjust trampolines after HPy import update
1 parent ee54976 commit cfa56dc

File tree

2 files changed

+52
-157
lines changed

2 files changed

+52
-157
lines changed

graalpython/com.oracle.graal.python.cext/include/hpy/universal/autogen_ctx.h

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,9 @@ struct _HPyContext_s {
128128
_HPyConst h_BoolType;
129129
_HPyConst h_LongType;
130130
_HPyConst h_FloatType;
131-
_HPyConst h_ComplexType;
132131
_HPyConst h_UnicodeType;
133-
_HPyConst h_BytesType;
134132
_HPyConst h_TupleType;
135133
_HPyConst h_ListType;
136-
_HPyConst h_MemoryViewType;
137-
_HPyConst h_CapsuleType;
138-
_HPyConst h_SliceType;
139134
HPy (*ctx_Module_Create)(HPyContext *ctx, HPyModuleDef *def);
140135
HPy (*ctx_Dup)(HPyContext *ctx, HPy h);
141136
void (*ctx_Close)(HPyContext *ctx, HPy h);
@@ -159,7 +154,6 @@ struct _HPyContext_s {
159154
double (*ctx_Float_AsDouble)(HPyContext *ctx, HPy h);
160155
HPy (*ctx_Bool_FromLong)(HPyContext *ctx, long v);
161156
HPy_ssize_t (*ctx_Length)(HPyContext *ctx, HPy h);
162-
int (*ctx_Sequence_Check)(HPyContext *ctx, HPy h);
163157
int (*ctx_Number_Check)(HPyContext *ctx, HPy h);
164158
HPy (*ctx_Add)(HPyContext *ctx, HPy h1, HPy h2);
165159
HPy (*ctx_Subtract)(HPyContext *ctx, HPy h1, HPy h2);
@@ -215,7 +209,6 @@ struct _HPyContext_s {
215209
HPy (*ctx_Type_GenericNew)(HPyContext *ctx, HPy type, _HPyPtr args, HPy_ssize_t nargs, HPy kw);
216210
HPy (*ctx_GetAttr)(HPyContext *ctx, HPy obj, HPy name);
217211
HPy (*ctx_GetAttr_s)(HPyContext *ctx, HPy obj, const char *name);
218-
HPy (*ctx_MaybeGetAttr_s)(HPyContext *ctx, HPy obj, const char *name);
219212
int (*ctx_HasAttr)(HPyContext *ctx, HPy obj, HPy name);
220213
int (*ctx_HasAttr_s)(HPyContext *ctx, HPy obj, const char *name);
221214
int (*ctx_SetAttr)(HPyContext *ctx, HPy obj, HPy name, HPy value);
@@ -229,9 +222,6 @@ struct _HPyContext_s {
229222
int (*ctx_SetItem_s)(HPyContext *ctx, HPy obj, const char *key, HPy value);
230223
HPy (*ctx_Type)(HPyContext *ctx, HPy obj);
231224
int (*ctx_TypeCheck)(HPyContext *ctx, HPy obj, HPy type);
232-
int (*ctx_SetType)(HPyContext *ctx, HPy obj, HPy type);
233-
int (*ctx_Type_IsSubtype)(HPyContext *ctx, HPy sub, HPy type);
234-
const char *(*ctx_Type_GetName)(HPyContext *ctx, HPy type);
235225
int (*ctx_Is)(HPyContext *ctx, HPy obj, HPy other);
236226
void *(*ctx_AsStruct)(HPyContext *ctx, HPy h);
237227
void *(*ctx_AsStructLegacy)(HPyContext *ctx, HPy h);
@@ -243,7 +233,6 @@ struct _HPyContext_s {
243233
HPy (*ctx_RichCompare)(HPyContext *ctx, HPy v, HPy w, int op);
244234
int (*ctx_RichCompareBool)(HPyContext *ctx, HPy v, HPy w, int op);
245235
HPy_hash_t (*ctx_Hash)(HPyContext *ctx, HPy obj);
246-
HPy (*ctx_SeqIter_New)(HPyContext *ctx, HPy seq);
247236
int (*ctx_Bytes_Check)(HPyContext *ctx, HPy h);
248237
HPy_ssize_t (*ctx_Bytes_Size)(HPyContext *ctx, HPy h);
249238
HPy_ssize_t (*ctx_Bytes_GET_SIZE)(HPyContext *ctx, HPy h);
@@ -264,27 +253,14 @@ struct _HPyContext_s {
264253
HPy_UCS4 (*ctx_Unicode_ReadChar)(HPyContext *ctx, HPy h, HPy_ssize_t index);
265254
HPy (*ctx_Unicode_DecodeASCII)(HPyContext *ctx, const char *s, HPy_ssize_t size, const char *errors);
266255
HPy (*ctx_Unicode_DecodeLatin1)(HPyContext *ctx, const char *s, HPy_ssize_t size, const char *errors);
267-
HPy (*ctx_Unicode_FromEncodedObject)(HPyContext *ctx, HPy obj, const char *encoding, const char *errors);
268-
HPy (*ctx_Unicode_InternFromString)(HPyContext *ctx, const char *str);
269-
HPy (*ctx_Unicode_Substring)(HPyContext *ctx, HPy obj, HPy_ssize_t start, HPy_ssize_t end);
270256
int (*ctx_List_Check)(HPyContext *ctx, HPy h);
271257
HPy (*ctx_List_New)(HPyContext *ctx, HPy_ssize_t len);
272258
int (*ctx_List_Append)(HPyContext *ctx, HPy h_list, HPy h_item);
273259
int (*ctx_Dict_Check)(HPyContext *ctx, HPy h);
274260
HPy (*ctx_Dict_New)(HPyContext *ctx);
275-
HPy (*ctx_Dict_Keys)(HPyContext *ctx, HPy h);
276-
HPy (*ctx_Dict_GetItem)(HPyContext *ctx, HPy op, HPy key);
277261
int (*ctx_Tuple_Check)(HPyContext *ctx, HPy h);
278262
HPy (*ctx_Tuple_FromArray)(HPyContext *ctx, _HPyPtr items, HPy_ssize_t n);
279-
int (*ctx_Slice_Unpack)(HPyContext *ctx, HPy slice, HPy_ssize_t *start, HPy_ssize_t *stop, HPy_ssize_t *step);
280-
HPy (*ctx_ContextVar_New)(HPyContext *ctx, const char *name, HPy default_value);
281-
int (*ctx_ContextVar_Get)(HPyContext *ctx, HPy context_var, HPy default_value, _HPyPtr result);
282-
HPy (*ctx_ContextVar_Set)(HPyContext *ctx, HPy context_var, HPy value);
283263
HPy (*ctx_Import_ImportModule)(HPyContext *ctx, const char *name);
284-
HPy (*ctx_Capsule_New)(HPyContext *ctx, void *pointer, const char *name, HPyCapsule_Destructor destructor);
285-
void *(*ctx_Capsule_Get)(HPyContext *ctx, HPy capsule, _HPyCapsule_key key, const char *name);
286-
int (*ctx_Capsule_IsValid)(HPyContext *ctx, HPy capsule, const char *name);
287-
int (*ctx_Capsule_Set)(HPyContext *ctx, HPy capsule, _HPyCapsule_key key, void *value);
288264
HPy (*ctx_FromPyObject)(HPyContext *ctx, cpy_PyObject *obj);
289265
cpy_PyObject *(*ctx_AsPyObject)(HPyContext *ctx, HPy h);
290266
void (*ctx_CallRealFunctionFromTrampoline)(HPyContext *ctx, HPyFunc_Signature sig, HPyCFunction func, void *args);
@@ -307,15 +283,15 @@ struct _HPyContext_s {
307283
void (*ctx_Global_Store)(HPyContext *ctx, _HPyGlobalPtr global, HPy h);
308284
HPy (*ctx_Global_Load)(HPyContext *ctx, HPyGlobal global);
309285
void (*ctx_Dump)(HPyContext *ctx, HPy h);
310-
HPy h_ComplexType;
311-
HPy h_BytesType;
312-
HPy h_MemoryViewType;
313-
HPy h_CapsuleType;
314-
HPy h_SliceType;
286+
_HPyConst h_ComplexType;
287+
_HPyConst h_BytesType;
288+
_HPyConst h_MemoryViewType;
289+
_HPyConst h_CapsuleType;
290+
_HPyConst h_SliceType;
315291
HPy (*ctx_MaybeGetAttr_s)(HPyContext *ctx, HPy obj, const char *name);
316292
int (*ctx_Slice_Unpack)(HPyContext *ctx, HPy slice, HPy_ssize_t *start, HPy_ssize_t *stop, HPy_ssize_t *step);
317293
HPy (*ctx_ContextVar_New)(HPyContext *ctx, const char *name, HPy default_value);
318-
int (*ctx_ContextVar_Get)(HPyContext *ctx, HPy context_var, HPy default_value, HPy *result);
294+
int (*ctx_ContextVar_Get)(HPyContext *ctx, HPy context_var, HPy default_value, _HPyPtr result);
319295
HPy (*ctx_ContextVar_Set)(HPyContext *ctx, HPy context_var, HPy value);
320296
HPy (*ctx_Capsule_New)(HPyContext *ctx, void *pointer, const char *name, HPyCapsule_Destructor destructor);
321297
void *(*ctx_Capsule_Get)(HPyContext *ctx, HPy capsule, _HPyCapsule_key key, const char *name);

0 commit comments

Comments
 (0)