mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
1996fad075
I missed this in https://github.com/tinygo-org/tinygo/pull/3391 (because I didn't test on Windows, my fault).
24 lines
459 B
Go
24 lines
459 B
Go
//go:build windows
|
|
|
|
package runtime
|
|
|
|
// Set environment variable in Windows:
|
|
//
|
|
// BOOL SetEnvironmentVariableA(
|
|
// [in] LPCSTR lpName,
|
|
// [in, optional] LPCSTR lpValue
|
|
// );
|
|
//
|
|
//export SetEnvironmentVariableA
|
|
func _SetEnvironmentVariableA(key, val *byte) bool
|
|
|
|
func setenv(key, val *byte) {
|
|
// ignore any errors
|
|
_SetEnvironmentVariableA(key, val)
|
|
}
|
|
|
|
func unsetenv(key *byte) {
|
|
// ignore any errors
|
|
_SetEnvironmentVariableA(key, nil)
|
|
}
|