List of commits:
Subject Hash Author Date (UTC)
Use Py_RETURN_FALSE/Py_RETURN_TRUE rather than PyBool_FromLong(0)/PyBool_FromLong(1). (#567) 370fd202f1a3d06329ca2dbfdcb22ca1c9de64c0 Serhiy Storchaka 2017-03-08 18:47:48
Fix the only non-C90 comment to be C90 compatible. (#566) f7eda3882e2fa989330d71c098d3b625bb2749d3 n.d. parker 2017-03-08 18:24:22
Exit Travis when only Misc/* is changed. (#564) 4a2ffce791ce18453adabcc1a2de29500f9a50aa Serhiy Storchaka 2017-03-08 18:22:16
bpo-29645: Speed up importing the webbrowser module. (#484) a7cba27aea138311117e2ab1d91584efcfeac4ec Serhiy Storchaka 2017-03-08 15:15:54
bpo-28231: The zipfile module now accepts path-like objects for external paths. (#511) 8606e9524a7a4065042f7f228dc57eb74f88e4d3 Serhiy Storchaka 2017-03-08 12:37:51
bpo-28331: fix impl-detail label is removed when content is translated. (GH-195) c351ce6a2c923c5016e48ecbf7b1e4833031d154 INADA Naoki 2017-03-08 10:07:13
bpo-28230: Document the pathlib support in tarfile and add tests. (#512) c45cd167d403d7d98078d5fc4a37b16195dc7a35 Serhiy Storchaka 2017-03-08 08:32:44
Revert "bpo-29571: Use correct locale encoding in test_re (#149)" (#554) 21a74312f2d1ddee71fade709af49d078085ec30 Benjamin Peterson 2017-03-08 06:48:09
allow the first call to wcsxfrm to return ERANGE (#536) ad4a0cc519a5bb14204324e0e32e976318f9e6ce Benjamin Peterson 2017-03-08 06:24:44
make the glibc alias table take precedence over the X11 one (#422) 02371e0ed1ee82ec73e7d363bcf2ed40cde1397a Benjamin Peterson 2017-03-08 06:03:13
bpo-29568: Disable any characters between two percents for escaped percent "%%" in the format string for classic string formatting. (GH-513) 9f8ad3f39e0a92ed37d012b9dd237399524f0d51 Serhiy Storchaka 2017-03-08 03:51:19
bpo-24329: allow __qualname__ and __classcell__ in __slots__ (GH-495) c393ee858932f79bd6dabf31550f9a53ea90bc68 Xiang Zhang 2017-03-08 03:18:49
bpo-26915: Test identity first in membership operation in index() and count() methods of collections.abc.Sequence (GH-503) d5d3249e8a37936d32266fa06ac20017307a1f70 Xiang Zhang 2017-03-08 03:04:24
bpo-28682: Added support for bytes paths in os.fwalk(). (#489) 8f6b344d368c15c3fe56c65c2f2776e7766fef55 Serhiy Storchaka 2017-03-07 12:33:21
PCbuild: Add -q option to svn export (GH-535) 8886d5f39286dffa7d9337857b151e7fb4af23fd INADA Naoki 2017-03-07 06:34:38
bpo-29676: fix lsprof can't profile C method call. (GH523) 93fac8dd358cd0e85e7b59115db226ce685d3f6f INADA Naoki 2017-03-07 05:24:37
bpo-28728: clarify possible test failure due to ISP (GH-412) d36a71637cefdddc02efd884f1b2c204f370afaa Xiang Zhang 2017-03-07 03:06:09
Exclude myself from mention-bot (#529) fea967658d2dff1e2afc45311e1ee6a40e3176c2 Victor Stinner 2017-03-07 01:51:47
bpo-29737: Optimize concatenating with empty tuple. (#524) 98e80c2babac0003182c3482c6c5437ea111e795 Serhiy Storchaka 2017-03-06 21:39:35
bpo-15954: Check return code of wcsxfrm(). (#508) be487a65f18e1be5fde03e2977fff4be53cc2fbf Serhiy Storchaka 2017-03-06 19:21:41
Commit 370fd202f1a3d06329ca2dbfdcb22ca1c9de64c0 - Use Py_RETURN_FALSE/Py_RETURN_TRUE rather than PyBool_FromLong(0)/PyBool_FromLong(1). (#567)
Author: Serhiy Storchaka
Author date (UTC): 2017-03-08 18:47
Committer name: GitHub
Committer date (UTC): 2017-03-08 18:47
Parent(s): f7eda3882e2fa989330d71c098d3b625bb2749d3
Signer:
Signing key:
Signing status: N
Tree: af8e8ecd59abc94756f4f88aa4335b804a673cbc
File Lines added Lines deleted
Objects/unicodeobject.c 25 25
Python/import.c 1 1
File Objects/unicodeobject.c changed (mode: 100644) (index 58899adc46..d5cf9548ae)
... ... unicode_islower_impl(PyObject *self)
11748 11748
11749 11749 /* Special case for empty strings */ /* Special case for empty strings */
11750 11750 if (length == 0) if (length == 0)
11751 return PyBool_FromLong(0);
11751 Py_RETURN_FALSE;
11752 11752
11753 11753 cased = 0; cased = 0;
11754 11754 for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
11755 11755 const Py_UCS4 ch = PyUnicode_READ(kind, data, i); const Py_UCS4 ch = PyUnicode_READ(kind, data, i);
11756 11756
11757 11757 if (Py_UNICODE_ISUPPER(ch) || Py_UNICODE_ISTITLE(ch)) if (Py_UNICODE_ISUPPER(ch) || Py_UNICODE_ISTITLE(ch))
11758 return PyBool_FromLong(0);
11758 Py_RETURN_FALSE;
11759 11759 else if (!cased && Py_UNICODE_ISLOWER(ch)) else if (!cased && Py_UNICODE_ISLOWER(ch))
11760 11760 cased = 1; cased = 1;
11761 11761 } }
 
... ... unicode_isupper_impl(PyObject *self)
11793 11793
11794 11794 /* Special case for empty strings */ /* Special case for empty strings */
11795 11795 if (length == 0) if (length == 0)
11796 return PyBool_FromLong(0);
11796 Py_RETURN_FALSE;
11797 11797
11798 11798 cased = 0; cased = 0;
11799 11799 for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
11800 11800 const Py_UCS4 ch = PyUnicode_READ(kind, data, i); const Py_UCS4 ch = PyUnicode_READ(kind, data, i);
11801 11801
11802 11802 if (Py_UNICODE_ISLOWER(ch) || Py_UNICODE_ISTITLE(ch)) if (Py_UNICODE_ISLOWER(ch) || Py_UNICODE_ISTITLE(ch))
11803 return PyBool_FromLong(0);
11803 Py_RETURN_FALSE;
11804 11804 else if (!cased && Py_UNICODE_ISUPPER(ch)) else if (!cased && Py_UNICODE_ISUPPER(ch))
11805 11805 cased = 1; cased = 1;
11806 11806 } }
 
... ... unicode_istitle_impl(PyObject *self)
11840 11840
11841 11841 /* Special case for empty strings */ /* Special case for empty strings */
11842 11842 if (length == 0) if (length == 0)
11843 return PyBool_FromLong(0);
11843 Py_RETURN_FALSE;
11844 11844
11845 11845 cased = 0; cased = 0;
11846 11846 previous_is_cased = 0; previous_is_cased = 0;
 
... ... unicode_istitle_impl(PyObject *self)
11849 11849
11850 11850 if (Py_UNICODE_ISUPPER(ch) || Py_UNICODE_ISTITLE(ch)) { if (Py_UNICODE_ISUPPER(ch) || Py_UNICODE_ISTITLE(ch)) {
11851 11851 if (previous_is_cased) if (previous_is_cased)
11852 return PyBool_FromLong(0);
11852 Py_RETURN_FALSE;
11853 11853 previous_is_cased = 1; previous_is_cased = 1;
11854 11854 cased = 1; cased = 1;
11855 11855 } }
11856 11856 else if (Py_UNICODE_ISLOWER(ch)) { else if (Py_UNICODE_ISLOWER(ch)) {
11857 11857 if (!previous_is_cased) if (!previous_is_cased)
11858 return PyBool_FromLong(0);
11858 Py_RETURN_FALSE;
11859 11859 previous_is_cased = 1; previous_is_cased = 1;
11860 11860 cased = 1; cased = 1;
11861 11861 } }
 
... ... unicode_isspace_impl(PyObject *self)
11895 11895
11896 11896 /* Special case for empty strings */ /* Special case for empty strings */
11897 11897 if (length == 0) if (length == 0)
11898 return PyBool_FromLong(0);
11898 Py_RETURN_FALSE;
11899 11899
11900 11900 for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
11901 11901 const Py_UCS4 ch = PyUnicode_READ(kind, data, i); const Py_UCS4 ch = PyUnicode_READ(kind, data, i);
11902 11902 if (!Py_UNICODE_ISSPACE(ch)) if (!Py_UNICODE_ISSPACE(ch))
11903 return PyBool_FromLong(0);
11903 Py_RETURN_FALSE;
11904 11904 } }
11905 return PyBool_FromLong(1);
11905 Py_RETURN_TRUE;
11906 11906 } }
11907 11907
11908 11908 /*[clinic input] /*[clinic input]
 
... ... unicode_isalpha_impl(PyObject *self)
11935 11935
11936 11936 /* Special case for empty strings */ /* Special case for empty strings */
11937 11937 if (length == 0) if (length == 0)
11938 return PyBool_FromLong(0);
11938 Py_RETURN_FALSE;
11939 11939
11940 11940 for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
11941 11941 if (!Py_UNICODE_ISALPHA(PyUnicode_READ(kind, data, i))) if (!Py_UNICODE_ISALPHA(PyUnicode_READ(kind, data, i)))
11942 return PyBool_FromLong(0);
11942 Py_RETURN_FALSE;
11943 11943 } }
11944 return PyBool_FromLong(1);
11944 Py_RETURN_TRUE;
11945 11945 } }
11946 11946
11947 11947 /*[clinic input] /*[clinic input]
 
... ... unicode_isalnum_impl(PyObject *self)
11976 11976
11977 11977 /* Special case for empty strings */ /* Special case for empty strings */
11978 11978 if (len == 0) if (len == 0)
11979 return PyBool_FromLong(0);
11979 Py_RETURN_FALSE;
11980 11980
11981 11981 for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
11982 11982 const Py_UCS4 ch = PyUnicode_READ(kind, data, i); const Py_UCS4 ch = PyUnicode_READ(kind, data, i);
11983 11983 if (!Py_UNICODE_ISALNUM(ch)) if (!Py_UNICODE_ISALNUM(ch))
11984 return PyBool_FromLong(0);
11984 Py_RETURN_FALSE;
11985 11985 } }
11986 return PyBool_FromLong(1);
11986 Py_RETURN_TRUE;
11987 11987 } }
11988 11988
11989 11989 /*[clinic input] /*[clinic input]
 
... ... unicode_isdecimal_impl(PyObject *self)
12016 12016
12017 12017 /* Special case for empty strings */ /* Special case for empty strings */
12018 12018 if (length == 0) if (length == 0)
12019 return PyBool_FromLong(0);
12019 Py_RETURN_FALSE;
12020 12020
12021 12021 for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
12022 12022 if (!Py_UNICODE_ISDECIMAL(PyUnicode_READ(kind, data, i))) if (!Py_UNICODE_ISDECIMAL(PyUnicode_READ(kind, data, i)))
12023 return PyBool_FromLong(0);
12023 Py_RETURN_FALSE;
12024 12024 } }
12025 return PyBool_FromLong(1);
12025 Py_RETURN_TRUE;
12026 12026 } }
12027 12027
12028 12028 /*[clinic input] /*[clinic input]
 
... ... unicode_isdigit_impl(PyObject *self)
12056 12056
12057 12057 /* Special case for empty strings */ /* Special case for empty strings */
12058 12058 if (length == 0) if (length == 0)
12059 return PyBool_FromLong(0);
12059 Py_RETURN_FALSE;
12060 12060
12061 12061 for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
12062 12062 if (!Py_UNICODE_ISDIGIT(PyUnicode_READ(kind, data, i))) if (!Py_UNICODE_ISDIGIT(PyUnicode_READ(kind, data, i)))
12063 return PyBool_FromLong(0);
12063 Py_RETURN_FALSE;
12064 12064 } }
12065 return PyBool_FromLong(1);
12065 Py_RETURN_TRUE;
12066 12066 } }
12067 12067
12068 12068 /*[clinic input] /*[clinic input]
 
... ... unicode_isnumeric_impl(PyObject *self)
12095 12095
12096 12096 /* Special case for empty strings */ /* Special case for empty strings */
12097 12097 if (length == 0) if (length == 0)
12098 return PyBool_FromLong(0);
12098 Py_RETURN_FALSE;
12099 12099
12100 12100 for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
12101 12101 if (!Py_UNICODE_ISNUMERIC(PyUnicode_READ(kind, data, i))) if (!Py_UNICODE_ISNUMERIC(PyUnicode_READ(kind, data, i)))
12102 return PyBool_FromLong(0);
12102 Py_RETURN_FALSE;
12103 12103 } }
12104 return PyBool_FromLong(1);
12104 Py_RETURN_TRUE;
12105 12105 } }
12106 12106
12107 12107 int int
File Python/import.c changed (mode: 100644) (index 53c0f4defb..0fc4d1da54)
... ... _imp_lock_held_impl(PyObject *module)
240 240 #ifdef WITH_THREAD #ifdef WITH_THREAD
241 241 return PyBool_FromLong(import_lock_thread != -1); return PyBool_FromLong(import_lock_thread != -1);
242 242 #else #else
243 return PyBool_FromLong(0);
243 Py_RETURN_FALSE;
244 244 #endif #endif
245 245 } }
246 246
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using git:
git clone git://git.rocketgit.com/user/benf_wspdigital/cpython

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main