Skip to content

Commit a0c96d1

Browse files
committed
re-add lost wrap_setter usage for GetSet setters
1 parent 5b5e0ba commit a0c96d1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

graalpython/com.oracle.graal.python.cext/src/capi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ typedef PyObject* (*f20)(PyObject*, PyObject*, PyObject*, PyObject*, PyObject*,
476476
#define _CALL_ARITY(FUN, ...) ( (_PICK_FUN_CAST(NULL, ##__VA_ARGS__, f20, f19, f18, f17, f16, f15, f14, f13, f12, f11, f10, f9, f8, f7, f6, f5, f4, f3, f2, f1, f0))(FUN))(__VA_ARGS__)
477477
#define ARG(__n) ((PyObject*)polyglot_get_arg((__n)))
478478

479-
int wrap_setter(PyCFunction fun, PyObject* self, PyObject* value, PyObject* closure) {
479+
int wrap_setter(PyCFunction fun, PyObject* self, PyObject* value, void* closure) {
480480
return _CALL_ARITY(fun, ARG(1), ARG(2), ARG(3));
481481
}
482482

graalpython/com.oracle.graal.python.cext/src/capi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void initialize_hashes();
153153

154154
// prototype of C landing function
155155
void* wrap_direct(PyCFunction fun, ...);
156-
int wrap_setter(PyCFunction fun, PyObject *self, PyObject *value, PyObject *closure);
156+
int wrap_setter(PyCFunction fun, PyObject *self, PyObject *value, void *closure);
157157
void* wrap_varargs(PyCFunction fun, PyObject *module, PyObject *varargs);
158158
void* wrap_keywords(PyCFunctionWithKeywords fun, PyObject *module, PyObject *varargs, PyObject *kwargs);
159159
void* wrap_noargs(PyCFunction fun, PyObject *module, PyObject *pnone);

graalpython/com.oracle.graal.python.cext/src/object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ int PyType_Ready(PyTypeObject* cls) {
358358
getter_fun != NULL ? (getter)getter_fun : native_to_java(Py_None),
359359
wrap_direct,
360360
setter_fun != NULL ? (setter)setter_fun : native_to_java(Py_None),
361-
wrap_direct,
361+
wrap_setter,
362362
getset.doc ? polyglot_from_string(getset.doc, SRC_CS) : polyglot_from_string("", SRC_CS),
363363
// do not convert the closure, it is handed to the
364364
// getter and setter as-is

0 commit comments

Comments
 (0)