This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Re: [PATCH] for Review: Fix for PR java/12548


Hi Tom,

>Mohan> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12548
>
>Mohan> 	PR java/12548
>Mohan> 	* resource.c (write_resource_constructor): append
>Mohan> 	"_resource" to constructor identifier name.
>
>I think this is fine, except that as Jeff noted the indentation is
>incorrect, and also `concat' returns a malloc()d string which must be
>freed.  Please fix these two problems.

Could you take one last glance at this? I'm still grappling with the
coding standards. I reran my same handful of tests on Linux and
Windows and everything checks out okay.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/

ChangeLog
2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>

	PR java/12548
	* resource.c (write_resource_constructor): append
	"_resource" to constructor identifier name.

Index: resource.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/resource.c,v
retrieving revision 1.8
diff -u -2 -r1.8 resource.c
--- resource.c	22 Sep 2003 05:09:32 -0000	1.8
+++ resource.c	25 Nov 2003 06:39:53 -0000
@@ -106,4 +106,5 @@
   tree iter;
   location_t saved_loc = input_location;
+  char *resource_ctor_name;
 
   /* Only do work if required.  */
@@ -111,5 +112,8 @@
     return;
 
-  init_name = get_file_function_name ('I');
+  resource_ctor_name = concat (IDENTIFIER_POINTER (get_file_function_name ('I')),
+			       "_resource", NULL);
+  init_name = get_identifier (resource_ctor_name);
+  free (resource_ctor_name);
   init_type = build_function_type (void_type_node, end_params_node);
 




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