bpo-39573: Add Py_SET_TYPE() function (GH-18394)

Add Py_SET_TYPE() function to set the type of an object.
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 26e238c..dfc5b19 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -221,7 +221,7 @@
             return;
         }
         numfree++;
-        Py_TYPE(op) = (struct _typeobject *)free_list;
+        Py_SET_TYPE(op, (PyTypeObject *)free_list);
         free_list = op;
     }
     else