mirror of https://github.com/python/cpython
This patch fixes the handling of a weak-linked
variable and should fix issue #8095.
This commit is contained in:
parent
1bf02022fe
commit
1c3d193960
|
@ -64,13 +64,18 @@ get_proxy_settings(PyObject* mod __attribute__((__unused__)))
|
||||||
result = PyDict_New();
|
result = PyDict_New();
|
||||||
if (result == NULL) goto error;
|
if (result == NULL) goto error;
|
||||||
|
|
||||||
aNum = CFDictionaryGetValue(proxyDict,
|
if (&kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
|
||||||
|
aNum = CFDictionaryGetValue(proxyDict,
|
||||||
kSCPropNetProxiesExcludeSimpleHostnames);
|
kSCPropNetProxiesExcludeSimpleHostnames);
|
||||||
if (aNum == NULL) {
|
if (aNum == NULL) {
|
||||||
v = PyBool_FromLong(0);
|
v = PyBool_FromLong(1);
|
||||||
} else {
|
} else {
|
||||||
v = PyBool_FromLong(cfnum_to_int32(aNum));
|
v = PyBool_FromLong(cfnum_to_int32(aNum));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
v = PyBool_FromLong(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v == NULL) goto error;
|
if (v == NULL) goto error;
|
||||||
|
|
||||||
r = PyDict_SetItemString(result, "exclude_simple", v);
|
r = PyDict_SetItemString(result, "exclude_simple", v);
|
||||||
|
|
Loading…
Reference in New Issue