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.
Backported from trunk.
diff --git a/Misc/NEWS b/Misc/NEWS
index 2bdbbc4..7313802 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -75,6 +75,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.
+
- Bug #813342: Start the IDLE subprocess with -Qnew if the parent
is started with that option.