patch 8.1.1414: alloc() returning "char_u *" causes a lot of type casts
Problem: Alloc() returning "char_u *" causes a lot of type casts.
Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to
check the simple allocations.
diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c
index 2bd337e..211e115 100644
--- a/src/os_mac_conv.c
+++ b/src/os_mac_conv.c
@@ -550,7 +550,7 @@
}
convertRange = CFRangeMake(0, CFStringGetLength(utf8_str));
- result = (UniChar *)alloc(convertRange.length * sizeof(UniChar));
+ result = ALLOC_MULT(UniChar, convertRange.length);
CFStringGetCharacters(utf8_str, convertRange, result);