From c8bfb6c665a614979bdab2fd4a6f2ca11d77cbcb Mon Sep 17 00:00:00 2001
From: Christopher Chavez <chrischavez@gmx.us>
Date: Fri, 14 Aug 2020 17:46:39 -0500
Subject: [PATCH 1/6] Aqua X11 emulation: Adjust some comments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

…to reflect memory allocation side effects, and that X11 emulation
functions are still used outside of core Tk.
---
 macosx/tkMacOSXDraw.c  |  2 +-
 macosx/tkMacOSXImage.c | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git macosx/tkMacOSXDraw.c macosx/tkMacOSXDraw.c
index a31819a87..59379e6c8 100644
--- macosx/tkMacOSXDraw.c
+++ macosx/tkMacOSXDraw.c
@@ -112,7 +112,7 @@ TkMacOSXInitCGDrawing(
  *
  *	Extract bitmap data from a MacOSX drawable as an NSBitmapImageRep.
  *
- *      This is only used by XGetImage, which is never called.  And this
+ *      Currently only used by XGetImage and XCopyArea.  And this
  *      implementation does not work correctly.  Originally it relied on
  *      [NSBitmapImageRep initWithFocusedViewRect:view_rect] which was
  *      deprecated by Apple in OSX 10.14 and also required the use of other
diff --git macosx/tkMacOSXImage.c macosx/tkMacOSXImage.c
index 0e33b2360..3fc472e44 100644
--- macosx/tkMacOSXImage.c
+++ macosx/tkMacOSXImage.c
@@ -33,10 +33,10 @@ _XInitImageFuncPtrs(
  *      in Tk_PutImage and (currently) nowhere else.
  *
  * Results:
- *	CGImage, release after use.
+ *	CGImage (release after use), or NULL.
  *
  * Side effects:
- *	None.
+ *	If successful, allocates a CGImage.
  *
  *----------------------------------------------------------------------
  */
@@ -134,7 +134,7 @@ TkMacOSXCreateCGImageWithXImage(
  * XGetImage --
  *
  *	This function copies data from a pixmap or window into an XImage.  It
- *      is essentially never used. At one time it was called by
+ *      is essentially never used in core Tk. At one time it was called by
  *      pTkImgPhotoDisplay, but that is no longer the case. Currently it is
  *      called two places, one of which is requesting an XY image which we do
  *      not support.  It probably does not work correctly -- see the comments
@@ -147,7 +147,7 @@ TkMacOSXCreateCGImageWithXImage(
  *	display, the dimensions of the XImage will be 2*width x 2*height.
  *
  * Side effects:
- *	None.
+ *	If successful, allocates an XImage.
  *
  *----------------------------------------------------------------------
  */
@@ -528,9 +528,9 @@ XCreateImage(
  *
  * TkPutImage, XPutImage --
  *
- *	Copies a rectangular subimage of an XImage into a drawable.  Currently
- *      this is only called by TkImgPhotoDisplay, using a Window as the
- *      drawable.
+ *	Copies a rectangular subimage of an XImage into a drawable.
+ *	In core Tk, this is currently only called by TkImgPhotoDisplay,
+ *	using a Window as the drawable.
  *
  * Results:
  *	None.
-- 
2.28.0

