(_env: MutableMapping[str, str] | None = None)
| 39 | |
| 40 | |
| 41 | def _environ_size(_env: MutableMapping[str, str] | None = None) -> int: |
| 42 | environ = _env if _env is not None else getattr(os, 'environb', os.environ) |
| 43 | size = 8 * len(environ) # number of pointers in `envp` |
| 44 | for k, v in environ.items(): |
| 45 | size += len(k) + len(v) + 2 # c strings in `envp` |
| 46 | return size |
| 47 | |
| 48 | |
| 49 | def _get_platform_max_length() -> int: # pragma: no cover (platform specific) |
no outgoing calls
no test coverage detected