Skip to content

Commit c27461f

Browse files
glaukiol1sbinet
andauthored
Update os/os.module.go
Co-authored-by: Sebastien Binet <[email protected]>
1 parent 55b1e15 commit c27461f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

os/os.module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func init() {
114114
// getEnvVariables returns the dictionary of environment variables.
115115
func getEnvVariables() py.StringDict {
116116
vs := os.Environ()
117-
dict := py.NewStringDict()
117+
dict := py.NewStringDictSized(len(vs))
118118
for _, evar := range vs {
119119
key_value := strings.SplitN(evar, "=", 2) // returns a []string containing [key,value]
120120
dict.M__setitem__(py.String(key_value[0]), py.String(key_value[1]))

0 commit comments

Comments
 (0)