Signatures of the functions are different.
UCS2:
internal unsafe static extern char* PyUnicode_AsUnicode(IntPtr ob);
UCS4:
internal unsafe static extern IntPtr PyUnicode_AsUnicode(IntPtr ob);
Leading to weird hacks in the code such as 1 and 2
Consolidate signature to IntPtr and remove PyUnicode_AS_UNICODE which does the same thing.