diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-04-20 09:57:18 +0000 |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-04-20 09:57:18 +0000 |
commit | 6b36cd59bcf2c3b9533c7a74eab86aef20f7c2eb (patch) | |
tree | e503bb02f6c575f249fb7a12677d57fc75755ef9 | |
parent | b8aaa0ddeb3901766abcc609294b7805f3f35432 (diff) | |
download | cpython-6b36cd59bcf2c3b9533c7a74eab86aef20f7c2eb.tar.gz |
Merged revisions 80243 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80243 | ronald.oussoren | 2010-04-20 10:54:48 +0200 (Tue, 20 Apr 2010) | 3 lines
This patch fixes the handling of a weak-linked
variable and should fix issue #8095.
........
-rw-r--r-- | Mac/Modules/_scproxy.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Mac/Modules/_scproxy.c b/Mac/Modules/_scproxy.c index 003f6a483f..9f4c1a4e8f 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); |