mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Move long lists out of functions
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
		
							parent
							
								
									e62bdefce1
								
							
						
					
					
						commit
						bbaa2b784a
					
				@ -159,11 +159,7 @@ def realfull_adapter(_name, active, section):
 | 
				
			|||||||
        return active
 | 
					        return active
 | 
				
			||||||
    return True
 | 
					    return True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def include_in_full(name):
 | 
					EXCLUDE_FROM_FULL = frozenset([
 | 
				
			||||||
    """Rules for symbols in the "full" configuration."""
 | 
					 | 
				
			||||||
    if re.search(r'PLATFORM_[A-Z0-9]+_ALT', name):
 | 
					 | 
				
			||||||
        return True
 | 
					 | 
				
			||||||
    if name in [
 | 
					 | 
				
			||||||
    'MBEDTLS_CTR_DRBG_USE_128_BIT_KEY',
 | 
					    'MBEDTLS_CTR_DRBG_USE_128_BIT_KEY',
 | 
				
			||||||
    'MBEDTLS_DEPRECATED_REMOVED',
 | 
					    'MBEDTLS_DEPRECATED_REMOVED',
 | 
				
			||||||
    'MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED',
 | 
					    'MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED',
 | 
				
			||||||
@ -194,7 +190,13 @@ def include_in_full(name):
 | 
				
			|||||||
    'MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3',
 | 
					    'MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3',
 | 
				
			||||||
    'MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION',
 | 
					    'MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION',
 | 
				
			||||||
    'MBEDTLS_ZLIB_SUPPORT',
 | 
					    'MBEDTLS_ZLIB_SUPPORT',
 | 
				
			||||||
    ]:
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def include_in_full(name):
 | 
				
			||||||
 | 
					    """Rules for symbols in the "full" configuration."""
 | 
				
			||||||
 | 
					    if re.search(r'PLATFORM_[A-Z0-9]+_ALT', name):
 | 
				
			||||||
 | 
					        return True
 | 
				
			||||||
 | 
					    if name in EXCLUDE_FROM_FULL:
 | 
				
			||||||
        return False
 | 
					        return False
 | 
				
			||||||
    if name.endswith('_ALT'):
 | 
					    if name.endswith('_ALT'):
 | 
				
			||||||
        return False
 | 
					        return False
 | 
				
			||||||
@ -206,9 +208,7 @@ def full_adapter(name, active, section):
 | 
				
			|||||||
        return active
 | 
					        return active
 | 
				
			||||||
    return include_in_full(name)
 | 
					    return include_in_full(name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def keep_in_baremetal(name):
 | 
					EXCLUDE_FROM_BAREMETAL = frozenset([
 | 
				
			||||||
    """Rules for symbols in the "baremetal" configuration."""
 | 
					 | 
				
			||||||
    if name in [
 | 
					 | 
				
			||||||
    'MBEDTLS_DEPRECATED_WARNING',
 | 
					    'MBEDTLS_DEPRECATED_WARNING',
 | 
				
			||||||
    'MBEDTLS_ENTROPY_NV_SEED',
 | 
					    'MBEDTLS_ENTROPY_NV_SEED',
 | 
				
			||||||
    'MBEDTLS_FS_IO',
 | 
					    'MBEDTLS_FS_IO',
 | 
				
			||||||
@ -224,7 +224,11 @@ def keep_in_baremetal(name):
 | 
				
			|||||||
    'MBEDTLS_THREADING_C',
 | 
					    'MBEDTLS_THREADING_C',
 | 
				
			||||||
    'MBEDTLS_THREADING_PTHREAD',
 | 
					    'MBEDTLS_THREADING_PTHREAD',
 | 
				
			||||||
    'MBEDTLS_TIMING_C',
 | 
					    'MBEDTLS_TIMING_C',
 | 
				
			||||||
    ]:
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def keep_in_baremetal(name):
 | 
				
			||||||
 | 
					    """Rules for symbols in the "baremetal" configuration."""
 | 
				
			||||||
 | 
					    if name in EXCLUDE_FROM_BAREMETAL:
 | 
				
			||||||
        return False
 | 
					        return False
 | 
				
			||||||
    return True
 | 
					    return True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user