summaryrefslogtreecommitdiffstats
path: root/Mac/Modules
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-04-20 08:54:48 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-04-20 08:54:48 (GMT)
commit1c3d1939602341cf7a6ba5a76a99f07b32731d46 (patch)
tree4e876eb49a215b6d3fd881e4c57359dc5af40802 /Mac/Modules
parent1bf02022fe538b26d175306b6ebdc7839b4d7937 (diff)
downloadcpython-1c3d1939602341cf7a6ba5a76a99f07b32731d46.zip
cpython-1c3d1939602341cf7a6ba5a76a99f07b32731d46.tar.gz
cpython-1c3d1939602341cf7a6ba5a76a99f07b32731d46.tar.bz2
This patch fixes the handling of a weak-linked
variable and should fix issue #8095.
Diffstat (limited to 'Mac/Modules')
-rw-r--r--Mac/Modules/_scproxy.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/Mac/Modules/_scproxy.c b/Mac/Modules/_scproxy.c
index 003f6a4..9f4c1a4 100644
--- a/Mac/Modules/_scproxy.c
+++ b/Mac/Modules/_scproxy.c
@@ -64,13 +64,18 @@ get_proxy_settings(PyObject* mod __attribute__((__unused__)))
result = PyDict_New();
if (result == NULL) goto error;
- aNum = CFDictionaryGetValue(proxyDict,
+ if (&kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
+ aNum = CFDictionaryGetValue(proxyDict,
kSCPropNetProxiesExcludeSimpleHostnames);
- if (aNum == NULL) {
- v = PyBool_FromLong(0);
- } else {
- v = PyBool_FromLong(cfnum_to_int32(aNum));
+ if (aNum == NULL) {
+ v = PyBool_FromLong(1);
+ } else {
+ v = PyBool_FromLong(cfnum_to_int32(aNum));
+ }
+ } else {
+ v = PyBool_FromLong(1);
}
+
if (v == NULL) goto error;
r = PyDict_SetItemString(result, "exclude_simple", v);