Skip to content

Commit d9bf7e3

Browse files
glaukiol1sbinet
andcommitted
Update os/os.module.go
Co-authored-by: Sebastien Binet <[email protected]>
1 parent f88bde1 commit d9bf7e3

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)