unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] comment unused args in resize_cb() in src/widget.c
@ 2021-09-07 17:26 Adam Kandur via Emacs development discussions.
  2021-09-07 17:40 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Kandur via Emacs development discussions. @ 2021-09-07 17:26 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

Hi emacs!
I've been playing with emacs sources and noticed resize_cb () in src/widget.c accept 4 arguments but use only one inside. I'm new in programming (and C), but i decided to comment other args and build it.
Maybe it would be usefull.Adam.

[-- Attachment #2: 0001-comment-unused-args-in-resize_cb-in-src-widget.c.patch --]
[-- Type: text/x-patch, Size: 848 bytes --]

From 8d7edc5bc1fa6078af0e8588fc37bad6e5602a1e Mon Sep 17 00:00:00 2001
From: Adam Kandur <rndd@tuta.io>
Date: Tue, 7 Sep 2021 20:20:00 +0300
Subject: [PATCH] comment unused args in resize_cb() in src/widget.c

---
 src/widget.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/widget.c b/src/widget.c
index dd43fd1c46..6ee0a5c135 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -354,10 +354,10 @@ EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2)
 }
 
 static void
-resize_cb (Widget widget,
-           XtPointer closure,
-           XEvent *event,
-           Boolean *continue_to_dispatch)
+resize_cb (Widget widget)
+           /* XtPointer closure, */
+           /* XEvent *event, */
+           /* Boolean *continue_to_dispatch) */
 {
   EmacsFrameResize (widget);
 }
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] comment unused args in resize_cb() in src/widget.c
  2021-09-07 17:26 [PATCH] comment unused args in resize_cb() in src/widget.c Adam Kandur via Emacs development discussions.
@ 2021-09-07 17:40 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2021-09-07 17:40 UTC (permalink / raw)
  To: Adam Kandur; +Cc: emacs-devel

> Date: Tue, 7 Sep 2021 19:26:50 +0200 (CEST)
> From:  Adam Kandur via "Emacs development discussions." <emacs-devel@gnu.org>
> 
> I've been playing with emacs sources and noticed resize_cb () in src/widget.c accept 4 arguments but use only one inside. I'm new in programming (and C), but i decided to comment other args and build it.

It's used as a callback, so it has to have the signature expected by
XtAddRawEventHandler.  Even if it doesn't use some of the arguments.

Thanks.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-07 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 17:26 [PATCH] comment unused args in resize_cb() in src/widget.c Adam Kandur via Emacs development discussions.
2021-09-07 17:40 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).