Author: chromatic
Date: Tue May 15 14:48:45 2007
New Revision: 18561

Modified:
   trunk/src/jit/sun4/jit_emit.h
   trunk/src/library.c

Log:
[src] Use mem_sys_free() instead of free() (Mark Mattie, RT #42918).

Modified: trunk/src/jit/sun4/jit_emit.h
==============================================================================
--- trunk/src/jit/sun4/jit_emit.h       (original)
+++ trunk/src/jit/sun4/jit_emit.h       Tue May 15 14:48:45 2007
@@ -9,6 +9,12 @@
 #ifndef PARROT_SUN4_JIT_EMIT_H_GUARD
 #define PARROT_SUN4_JIT_EMIT_H_GUARD
 
+/* XXX As of rev 11423, sun4 jit no longer compiles due to the missing
+   Parrot_jit_init() function and the corresponding arch_info structure.
+   Prior to that, it compiled, but probably didn't work.  See notes labeled
+   XXX Hack [perl #37819]  below.
+*/
+
 /*
  * SPARC JIT overview:
  *

Modified: trunk/src/library.c
==============================================================================
--- trunk/src/library.c (original)
+++ trunk/src/library.c Tue May 15 14:48:45 2007
@@ -8,7 +8,7 @@
 
 =head1 DESCRIPTION
 
-This file contains a C function to access parrot's bytecode library functions.
+This file contains a C function to access Parrot's bytecode library functions.
 
 =head2 Functions
 
@@ -442,16 +442,16 @@
 Parrot_get_runtime_prefix(Interp *interp, STRING **prefix_str)
 {
     STRING *s, *key;
-    PMC *config_hash;
-    int free_it;
-    char *env;
+    PMC    *config_hash;
+    int     free_it;
+    char   *env;
 
     env = Parrot_getenv("PARROT_RUNTIME", &free_it);
     if (env) {
         if (prefix_str) {
             *prefix_str = string_from_cstring(interp, env, 0);
             if (free_it)
-                free(env);
+                mem_sys_free(env);
             return NULL;
         }
         if (!free_it)
@@ -461,7 +461,8 @@
 
     config_hash = VTABLE_get_pmc_keyed_int(interp, interp->iglobals,
             (INTVAL) IGLOBALS_CONFIG_HASH);
-    key = CONST_STRING(interp, "prefix");
+    key         = CONST_STRING(interp, "prefix");
+
     if (!VTABLE_elements(interp, config_hash)) {
         const char *pwd = ".";
         char *ret;
@@ -474,11 +475,14 @@
         strcpy(ret, pwd);
         return ret;
     }
+
     s = VTABLE_get_string_keyed_str(interp, config_hash, key);
+
     if (prefix_str) {
         *prefix_str = s;
         return NULL;
     }
+
     return string_to_cstring(interp, s);
 }
 

Reply via email to