diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-25 13:25:52 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-25 13:25:52 +0200 |
commit | 3f19a274c28567afb39ba46ea8a2ebdeab816b0b (patch) | |
tree | b455925dd27f3d6e421d9fca9f3295b988a24254 /Modules/_scproxy.c | |
parent | b0cbde5d42f12b3aca11b87c017b3c60a26be4fd (diff) | |
parent | c8486579312320fd09c56ce9fce3da7ea0ffd132 (diff) | |
download | cpython-3f19a274c28567afb39ba46ea8a2ebdeab816b0b.tar.gz |
Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro if
Py_LIMITED_API is not set or set to the value between 0x03050400
and 0x03060000 (not including) or 0x03060100 or higher.
Diffstat (limited to 'Modules/_scproxy.c')
-rw-r--r-- | Modules/_scproxy.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c index 66b6e3439f..1ce4b776f3 100644 --- a/Modules/_scproxy.c +++ b/Modules/_scproxy.c @@ -71,16 +71,12 @@ get_proxy_settings(PyObject* mod __attribute__((__unused__))) result = PyDict_New(); if (result == NULL) goto error; - if (&kSCPropNetProxiesExcludeSimpleHostnames != NULL) { - aNum = CFDictionaryGetValue(proxyDict, - kSCPropNetProxiesExcludeSimpleHostnames); - if (aNum == NULL) { - v = PyBool_FromLong(0); - } else { - v = PyBool_FromLong(cfnum_to_int32(aNum)); - } - } else { + aNum = CFDictionaryGetValue(proxyDict, + kSCPropNetProxiesExcludeSimpleHostnames); + if (aNum == NULL) { v = PyBool_FromLong(0); + } else { + v = PyBool_FromLong(cfnum_to_int32(aNum)); } if (v == NULL) goto error; @@ -130,7 +126,7 @@ error: } static int -set_proxy(PyObject* proxies, char* proto, CFDictionaryRef proxyDict, +set_proxy(PyObject* proxies, const char* proto, CFDictionaryRef proxyDict, CFStringRef enabledKey, CFStringRef hostKey, CFStringRef portKey) { |