Windows: _wputenv(env) copies the *env* string and doesn't require
the caller to manage the variable memory.
}
}
-#ifdef HAVE_PUTENV
+/* Windows: _wputenv(env) copies the *env* string and doesn't require the
+ caller to manage the variable memory. */
+#if defined(HAVE_PUTENV) && !defined(MS_WINDOWS)
# define PY_PUTENV_DICT
#endif
posix_error();
goto error;
}
+ /* _wputenv(env) copies the *env* string and doesn't require the caller
+ to manage the variable memory. */
+ Py_DECREF(unicode);
- posix_putenv_dict_setitem(name, unicode);
Py_RETURN_NONE;
error: