ctypes callback functions only support 'fundamental' result types.
Check this and raise an error when something else is used - before
this change ctypes would hang or crash when such a callback was
called. This is a partial fix for #1574584.
Will backport to release25-maint.
diff --git a/Misc/NEWS b/Misc/NEWS
index 9d22aed..b0f8f55 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -81,6 +81,10 @@
Library
-------
+- ctypes callback functions only support 'fundamental' data types as
+ result type. Raise an error when something else is used. This is a
+ partial fix for Bug #1574584.
+
- Fix turtle so that time.sleep is imported for the entire library. Allows
the demo2 function to be executed on its own instead of only when the
module is run as a script.