From 7ee67a8ba9474b5965fc0c17cb4a6ae5a0fe873e Mon Sep 17 00:00:00 2001 From: Anselm Kruis Date: Sun, 6 Jan 2019 18:29:30 +0100 Subject: [PATCH] Stackless issue #201: enable stackless calls of "wrapper_descriptor" objects, if soft-switching is enabled. The code has been in Stackless forever, but was disabled for some unknown reason. --- Objects/descrobject.c | 2 +- Stackless/changelog.txt | 5 +++++ Stackless/core/stackless_methods.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 26a66a9beebd0e..23262e61323e80 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -746,7 +746,7 @@ PyTypeObject PyWrapperDescr_Type = { 0, /* tp_descr_set */ }; -/* STACKLESS_DECLARE_METHOD(&PyWrapperDescr_Type, tp_call) */ +STACKLESS_DECLARE_METHOD(&PyWrapperDescr_Type, tp_call) static PyDescrObject * descr_new(PyTypeObject *descrtype, PyTypeObject *type, const char *name) diff --git a/Stackless/changelog.txt b/Stackless/changelog.txt index 7bbd425bbf2c77..17c73b4287221c 100644 --- a/Stackless/changelog.txt +++ b/Stackless/changelog.txt @@ -9,6 +9,11 @@ What's New in Stackless 3.X.X? *Release date: 20XX-XX-XX* +- https://github.com/stackless-dev/stackless/issues/201 + Enable stackless calls of "wrapper_descriptor" objects, if soft-switching is + enabled. The code has been in Stackless forever, but was disabled for some + unknown reason. + - https://github.com/stackless-dev/stackless/issues/200 Fix a bug in the C-API functions PyTasklet_Run_nr() and PyTasklet_Switch_nr(). Under exotic conditions the functions could diff --git a/Stackless/core/stackless_methods.h b/Stackless/core/stackless_methods.h index 412b5174e2e550..56ad3c6dce5065 100644 --- a/Stackless/core/stackless_methods.h +++ b/Stackless/core/stackless_methods.h @@ -19,6 +19,7 @@ static _stackless_method _stackless_methtable[] = { /* from descrobject.c */ {&PyMethodDescr_Type, MFLAG_OFS(tp_call)}, {&PyClassMethodDescr_Type, MFLAG_OFS(tp_call)}, + {&PyWrapperDescr_Type, MFLAG_OFS(tp_call)}, {&_PyMethodWrapper_Type, MFLAG_OFS(tp_call)}, /* from funcobject.c */ {&PyFunction_Type, MFLAG_OFS(tp_call)},