[svn:parrot] r41605 - trunk/config/gen/platform/win32

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Oct 1 23:39:42 UTC 2009


Author: bacek
Date: Thu Oct  1 23:39:39 2009
New Revision: 41605
URL: https://trac.parrot.org/parrot/changeset/41605

Log:
[cage] Fix win32 build (hopefully).

Modified:
   trunk/config/gen/platform/win32/env.c

Modified: trunk/config/gen/platform/win32/env.c
==============================================================================
--- trunk/config/gen/platform/win32/env.c	Thu Oct  1 23:07:27 2009	(r41604)
+++ trunk/config/gen/platform/win32/env.c	Thu Oct  1 23:39:39 2009	(r41605)
@@ -46,8 +46,8 @@
 void
 Parrot_setenv(PARROT_INTERP, STRING *str_name, STRING *str_value)
 {
-    const char * name  = Parrot_str_to_cstring(interp, str_name);
-    const char * value = Parrot_str_to_cstring(interp, str_value);
+    char * name  = Parrot_str_to_cstring(interp, str_name);
+    char * value = Parrot_str_to_cstring(interp, str_value);
     assert(name  != NULL);
     assert(value != NULL);
 
@@ -101,7 +101,7 @@
 char *
 Parrot_getenv(PARROT_INTERP, ARGIN(STRING *str_name))
 {
-    const char *name = Parrot_str_to_cstring(interp, str_name);
+    char *name       = Parrot_str_to_cstring(interp, str_name);
     const DWORD size = GetEnvironmentVariable(name, NULL, 0);
     char *buffer     = NULL;
 
@@ -127,15 +127,13 @@
 */
 
 void
-Parrot_unsetenv(PARROT_INTERP, STRING *str_name)
+Parrot_unsetenv(PARROT_INTERP, STRING *name)
 {
 /* You can remove a variable from the environment by specifying an empty
    string -- in other words, by specifying only varname=.
        -- _putenv, _wputenv (CRT) documentation
 */
-    const char *name = Parrot_str_to_cstring(interp, str_name);
     Parrot_setenv(name, "");
-    Parrot_str_free_cstring(name);
 }
 
 /*


More information about the parrot-commits mailing list