Author: mattip <[email protected]>
Branch:
Changeset: r72130:308e64d3c884
Date: 2014-06-22 10:27 +0300
http://bitbucket.org/pypy/pypy/changeset/308e64d3c884/
Log: putenv is _putenv on windows
diff --git a/rpython/rtyper/module/ll_os_environ.py
b/rpython/rtyper/module/ll_os_environ.py
--- a/rpython/rtyper/module/ll_os_environ.py
+++ b/rpython/rtyper/module/ll_os_environ.py
@@ -60,7 +60,7 @@
# ____________________________________________________________
# Access to the 'environ' external variable
-
+prefix = ''
if sys.platform.startswith('darwin'):
CCHARPPP = rffi.CArrayPtr(rffi.CCHARPP)
_os_NSGetEnviron = rffi.llexternal(
@@ -77,6 +77,7 @@
rffi.CCHARPP, '_environ', eci)
get__wenviron, _set__wenviron = rffi.CExternVariable(
CWCHARPP, '_wenviron', eci, c_type='wchar_t **')
+ prefix = '_'
else:
os_get_environ, _os_set_environ = rffi.CExternVariable(
rffi.CCHARPP, 'environ', ExternalCompilationInfo())
@@ -117,7 +118,7 @@
os_getenv = rffi.llexternal('getenv', [rffi.CCHARP], rffi.CCHARP,
releasegil=False)
-os_putenv = rffi.llexternal('putenv', [rffi.CCHARP], rffi.INT)
+os_putenv = rffi.llexternal(prefix + 'putenv', [rffi.CCHARP], rffi.INT)
if _WIN32:
_wgetenv = rffi.llexternal('_wgetenv', [rffi.CWCHARP], rffi.CWCHARP,
compilation_info=eci, releasegil=False)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit