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]

WIN-27: _Jv_Malloc instead of new



committed as shown below.

  - a

2002-02-24  Adam Megacz  <adam@xwt.org>

        * win32-threads.cc (_Jv_ThreadInitData): _Jv_Malloc instead of new
        * win32-threads.cc (_Jv_ThreadDestroyData): _Jv_Free instead of
        delete

Index: win32-threads.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/win32-threads.cc,v
retrieving revision 1.7
diff -u -r1.7 win32-threads.cc
--- win32-threads.cc    2002/02/07 19:26:02     1.7
+++ win32-threads.cc    2002/02/25 01:59:30
@@ -173,7 +173,7 @@
 _Jv_Thread_t *
 _Jv_ThreadInitData (java::lang::Thread* obj)
 {
-  _Jv_Thread_t *data = new _Jv_Thread_t;
+  _Jv_Thread_t *data = (_Jv_Thread_t*)_Jv_Malloc(sizeof(_Jv_Thread_t));
   data->flags = 0;
   data->thread_obj = obj;
 
@@ -183,7 +183,7 @@
 void
 _Jv_ThreadDestroyData (_Jv_Thread_t *data)
 {
-  delete data;
+  _Jv_Free(data);
 }
 
 void


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