This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Create cleanups.[ch] 2/2


Hi.

fyi, I've committed this patch.

2012-04-17  Doug Evans  <dje@google.com>

	* cleanups.c (make_my_cleanup,make_my_cleanup2): Make static.
	(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
	* cleanups.h (make_my_cleanup,make_my_cleanup2): Delete
	(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Delete.

Index: cleanups.c
===================================================================
RCS file: /cvs/src/src/gdb/cleanups.c,v
retrieving revision 1.1
diff -u -p -r1.1 cleanups.c
--- cleanups.c	17 Apr 2012 21:13:19 -0000	1.1
+++ cleanups.c	17 Apr 2012 21:19:59 -0000
@@ -37,7 +37,7 @@ static struct cleanup *final_cleanup_cha
    The result is a pointer to the previous chain pointer
    to be passed later to do_cleanups or discard_cleanups.  */
 
-struct cleanup *
+static struct cleanup *
 make_my_cleanup2 (struct cleanup **pmy_chain, make_cleanup_ftype *function,
 		  void *arg,  void (*free_arg) (void *))
 {
@@ -62,7 +62,7 @@ make_my_cleanup2 (struct cleanup **pmy_c
    The result is a pointer to the previous chain pointer
    to be passed later to do_cleanups or discard_cleanups.  */
 
-struct cleanup *
+static struct cleanup *
 make_my_cleanup (struct cleanup **pmy_chain, make_cleanup_ftype *function,
 		 void *arg)
 {
@@ -143,7 +143,7 @@ do_final_cleanups (struct cleanup *old_c
    OLD_CHAIN is the result of a "make" cleanup routine.
    Cleanups are discarded until we get back to the old end of the chain.  */
 
-void
+static void
 discard_my_cleanups (struct cleanup **pmy_chain,
 		     struct cleanup *old_chain)
 {
@@ -180,7 +180,7 @@ discard_final_cleanups (struct cleanup *
    PMY_CHAIN is a pointer to either cleanup_chain or final_cleanup_chain.
    The chain is emptied and the result is a pointer to the old chain.  */
 
-struct cleanup *
+static struct cleanup *
 save_my_cleanups (struct cleanup **pmy_chain)
 {
   struct cleanup *old_chain = *pmy_chain;
@@ -210,7 +210,7 @@ save_final_cleanups (void)
    PMY_CHAIN is a pointer to either cleanup_chain or final_cleanup_chain.
    The chain is restored from CHAIN.  */
 
-void
+static void
 restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain)
 {
   *pmy_chain = chain;
Index: cleanups.h
===================================================================
RCS file: /cvs/src/src/gdb/cleanups.h,v
retrieving revision 1.1
diff -u -p -r1.1 cleanups.h
--- cleanups.h	17 Apr 2012 21:13:19 -0000	1.1
+++ cleanups.h	17 Apr 2012 21:19:59 -0000
@@ -61,12 +61,6 @@ extern struct cleanup *make_cleanup_dtor
 
 extern struct cleanup *make_final_cleanup (make_cleanup_ftype *, void *);
 
-extern struct cleanup *make_my_cleanup (struct cleanup **,
-					make_cleanup_ftype *, void *);
-extern struct cleanup *make_my_cleanup2 (struct cleanup **,
-					 make_cleanup_ftype *, void *,
-					 void (*free_arg) (void *));
-
 /* A special value to pass to do_cleanups and do_final_cleanups
    to tell them to do all cleanups.  */
 #define	ALL_CLEANUPS	((struct cleanup *)0)
@@ -76,15 +70,12 @@ extern void do_final_cleanups (struct cl
 
 extern void discard_cleanups (struct cleanup *);
 extern void discard_final_cleanups (struct cleanup *);
-extern void discard_my_cleanups (struct cleanup **, struct cleanup *);
 
 extern struct cleanup *save_cleanups (void);
 extern struct cleanup *save_final_cleanups (void);
-extern struct cleanup *save_my_cleanups (struct cleanup **);
 
 extern void restore_cleanups (struct cleanup *);
 extern void restore_final_cleanups (struct cleanup *);
-extern void restore_my_cleanups (struct cleanup **, struct cleanup *);
 
 /* A no-op cleanup.
    This is useful when you want to establish a known reference point


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]