@@ -125,9 +125,9 @@ def int_option(name, *, accept_auto=False, **kw):
125125 f"{ s } : expecting an int" + (" or auto" if accept_auto else "" )
126126 )
127127
128- def args_from_config ():
129- argv = [CONFIG ["exepath" ]]
130- for opt , val in CONFIG .items ():
128+ def args_from_config (config ):
129+ argv = [config ["exepath" ]]
130+ for opt , val in config .items ():
131131 if opt .startswith ("opt_" ):
132132 if val is None :
133133 if opt == "opt_handle_signals" :
@@ -164,6 +164,7 @@ def args_from_config():
164164 CONFIG ["opt_warn_overwrite" ] = choice ("warn_overwrite" , ["yes" , "no" ])[0 ]
165165 CONFIG ["opt_handle_signals" ] = choice ("handle_signals" , ["yes" , "no" ])[0 ]
166166 CONFIG ["opt_startup_file" ] = choice ("startup_file" , ["yes" , "no" ])[0 ]
167+ CONFIG ["opt_heap_size_hint" ] = option ("heap_size_hint" )[0 ]
167168
168169 # Stop if we already initialised
169170 if CONFIG ["inited" ]:
@@ -208,7 +209,7 @@ def args_from_config():
208209 CONFIG ["lib" ] = lib = c .PyDLL (libpath , mode = c .RTLD_GLOBAL )
209210
210211 # parse options
211- argc , argv = args_from_config ()
212+ argc , argv = args_from_config (CONFIG )
212213 jl_parse_opts = lib .jl_parse_opts
213214 jl_parse_opts .argtypes = [c .c_void_p , c .c_void_p ]
214215 jl_parse_opts .restype = None
0 commit comments