[MLton-commit] r4541

Stephen Weeks MLton@mlton.org
Mon, 15 May 2006 17:49:09 -0700


Took out "const" from 

  const void *GC_getTextEnd (void);
  const void *GC_getTextStart (void);

It was causing the following warnings when compiling the runtime.

  gc/sources.c:64: warning: cast discards qualifiers from pointer target type
  gc/sources.c:65: warning: cast discards qualifiers from pointer target type


----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform.h

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c	2006-05-16 00:21:20 UTC (rev 4540)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c	2006-05-16 00:49:09 UTC (rev 4541)
@@ -8,11 +8,11 @@
 #include "mmap-protect.c"
 #include "use-mmap.c"
 
-const void *GC_getTextEnd (void) {
+void *GC_getTextEnd (void) {
         return (const void*)(long)(get_etext ());
 }
 
-const void *GC_getTextStart (void) {
+void *GC_getTextStart (void) {
         void *address;
         const struct mach_header *mh;
 

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c	2006-05-16 00:21:20 UTC (rev 4540)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c	2006-05-16 00:49:09 UTC (rev 4541)
@@ -2,9 +2,10 @@
 extern char _start;
 extern char etext;
 
-const void *GC_getTextStart (void) {
+void *GC_getTextStart (void) {
         return &_start;
 }
-const void *GC_getTextEnd (void) {
+
+void *GC_getTextEnd (void) {
         return &etext;
 }

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h	2006-05-16 00:21:20 UTC (rev 4540)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h	2006-05-16 00:49:09 UTC (rev 4541)
@@ -149,8 +149,8 @@
 /*                Text Segment                       */
 /* ------------------------------------------------- */
 
-const void *GC_getTextEnd (void);
-const void *GC_getTextStart (void);
+void *GC_getTextEnd (void);
+void *GC_getTextStart (void);
 
 /* ------------------------------------------------- */
 /*                SigProf Handler                    */