Rename buffer -> bytearray.
diff --git a/Lib/plat-mac/aepack.py b/Lib/plat-mac/aepack.py
index e958b85..5f8efd2 100644
--- a/Lib/plat-mac/aepack.py
+++ b/Lib/plat-mac/aepack.py
@@ -98,7 +98,7 @@
         return AE.AECreateDesc(b'long', struct.pack('l', x))
     if isinstance(x, float):
         return AE.AECreateDesc(b'doub', struct.pack('d', x))
-    if isinstance(x, (bytes, buffer)):
+    if isinstance(x, (bytes, bytearray)):
         return AE.AECreateDesc(b'TEXT', x)
     if isinstance(x, str):
         # See http://developer.apple.com/documentation/Carbon/Reference/Apple_Event_Manager/Reference/reference.html#//apple_ref/doc/constant_group/typeUnicodeText
diff --git a/Lib/plat-mac/aetypes.py b/Lib/plat-mac/aetypes.py
index d29ea97..6c031a1 100644
--- a/Lib/plat-mac/aetypes.py
+++ b/Lib/plat-mac/aetypes.py
@@ -22,7 +22,7 @@
     four_chars must contain only ASCII characters.
 
     """
-    if isinstance(four_chars, (bytes, buffer)):
+    if isinstance(four_chars, (bytes, bytearray)):
         b = bytes(four_chars[:4])
         n = len(b)
         if n < 4: