#NEWLINE# def getModuleValues( context , module_name , module_identifier , codes , function_decl_codes , function_body_codes , temp_variables , is_main_module , is_internal_module ) : #NEWLINE# #INDENT# local_var_inits = [ getLocalVariableInitCode ( variable = variable ) for variable in temp_variables ] #NEWLINE# if context . needsExceptionVariables ( ) : #NEWLINE# #INDENT# local_var_inits . extend ( getErrorVariableDeclarations ( ) ) #NEWLINE# #UNINDENT# for keeper_index in range ( 1 , ( context . getKeeperVariableCount ( ) + 1 ) ) : #NEWLINE# #INDENT# local_var_inits . extend ( getExceptionKeeperVariableNames ( keeper_index ) ) #NEWLINE# #UNINDENT# for preserver_id in context . getExceptionPreserverCounts ( ) : #NEWLINE# #INDENT# local_var_inits . extend ( getExceptionPreserverVariableNames ( preserver_id ) ) #NEWLINE# #UNINDENT# local_var_inits += [ ( '%s%s%s;' % ( tmp_type , ( ' ' if ( not tmp_type . endswith ( '*' ) ) else '' ) , tmp_name ) ) for ( tmp_name , tmp_type ) in context . getTempNameInfos ( ) ] #NEWLINE# for ( tmp_name , tmp_type ) in context . getTempNameInfos ( ) : #NEWLINE# #INDENT# if tmp_name . startswith ( 'tmp_outline_return_value_' ) : #NEWLINE# #INDENT# local_var_inits . append ( ( '%s = NULL;' % tmp_name ) ) #NEWLINE# #UNINDENT# #UNINDENT# local_var_inits += context . getFrameDeclarations ( ) #NEWLINE# if context . needsExceptionVariables ( ) : #NEWLINE# #INDENT# module_exit = template_module_exception_exit #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# module_exit = template_module_noexception_exit #NEWLINE# #UNINDENT# module_body_template_values = { #NEWLINE# #INDENT# 'module_name' : module_name , #NEWLINE# 'module_name_obj' : getConstantCode ( context = context , constant = module_name ) , #NEWLINE# 'is_main_module' : ( 1 if is_main_module else 0 ) , #NEWLINE# 'module_identifier' : module_name , #NEWLINE# 'module_functions_decl' : function_decl_codes , #NEWLINE# 'module_functions_code' : function_body_codes , #NEWLINE# 'temps_decl' : indented ( local_var_inits ) , #NEWLINE# 'module_code' : indented ( codes ) , #NEWLINE# 'module_exit' : module_exit , #NEWLINE# 'module_code_objects_decl' : indented ( getCodeObjectsDeclCode ( context ) , 0 ) , #NEWLINE# 'module_code_objects_init' : indented ( getCodeObjectsInitCode ( context ) , 1 ) , #NEWLINE# #UNINDENT# } #NEWLINE# allocateNestedConstants ( context ) #NEWLINE# if is_internal_module : #NEWLINE# #INDENT# for constant in context . getConstants ( ) : #NEWLINE# #INDENT# context . global_context . countConstantUse ( constant ) #NEWLINE# #UNINDENT# #UNINDENT# return module_body_template_values