| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4a72a7b commit 6d57fe1
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -176,7 +176,7 @@ typedef unsigned char Py_UCS1; | |||
| 176 | 176 | ||
| 177 | 177 | #define Py_UNICODE_FILL(target, value, length) \ | |
| 178 | 178 | do {Py_ssize_t i_; Py_UNICODE *t_ = (target); Py_UNICODE v_ = (value);\ | |
| 179 | - for (i_ = 0; i_ < (length); i_++) t_[i_] = v_;\ | ||
| 179 | + for (i_ = 0; i_ < (length); i_++) t_[i_] = v_;\ | ||
| 180 | 180 | } while (0) | |
| 181 | 181 | ||
| 182 | 182 | /* macros to work with surrogates */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5138,18 +5138,18 @@ comerror_init(PyObject *self, PyObject *args, PyObject *kwds) | |||
| 5138 | 5138 | int status; | |
| 5139 | 5139 | ||
| 5140 | 5140 | if (!_PyArg_NoKeywords(Py_TYPE(self)->tp_name, kwds)) | |
| 5141 | - return -1; | ||
| 5141 | + return -1; | ||
| 5142 | 5142 | ||
| 5143 | 5143 | if (!PyArg_ParseTuple(args, "OOO:COMError", &hresult, &text, &details)) | |
| 5144 | 5144 | return -1; | |
| 5145 | 5145 | ||
| 5146 | 5146 | a = PySequence_GetSlice(args, 1, PySequence_Size(args)); | |
| 5147 | 5147 | if (!a) | |
| 5148 | - return -1; | ||
| 5148 | + return -1; | ||
| 5149 | 5149 | status = PyObject_SetAttrString(self, "args", a); | |
| 5150 | 5150 | Py_DECREF(a); | |
| 5151 | 5151 | if (status < 0) | |
| 5152 | - return -1; | ||
| 5152 | + return -1; | ||
| 5153 | 5153 | ||
| 5154 | 5154 | if (PyObject_SetAttrString(self, "hresult", hresult) < 0) | |
| 5155 | 5155 | return -1; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,9 +54,10 @@ copy_grouping(char* s) | |||
| 54 | 54 | int i; | |
| 55 | 55 | PyObject *result, *val = NULL; | |
| 56 | 56 | ||
| 57 | - if (s[0] == '\0') | ||
| 57 | + if (s[0] == '\0') { | ||
| 58 | 58 | /* empty string: no grouping at all */ | |
| 59 | 59 | return PyList_New(0); | |
| 60 | + } | ||
| 60 | 61 | ||
| 61 | 62 | for (i = 0; s[i] != '\0' && s[i] != CHAR_MAX; i++) | |
| 62 | 63 | ; /* nothing */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ conv_descriptor(PyObject *object, int *target) | |||
| 26 | 26 | int fd = PyObject_AsFileDescriptor(object); | |
| 27 | 27 | ||
| 28 | 28 | if (fd < 0) | |
| 29 | - return 0; | ||
| 29 | + return 0; | ||
| 30 | 30 | *target = fd; | |
| 31 | 31 | return 1; | |
| 32 | 32 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -154,18 +154,18 @@ itimer_retval(struct itimerval *iv) | |||
| 154 | 154 | ||
| 155 | 155 | r = PyTuple_New(2); | |
| 156 | 156 | if (r == NULL) | |
| 157 | - return NULL; | ||
| 157 | + return NULL; | ||
| 158 | 158 | ||
| 159 | 159 | if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_value)))) { | |
| 160 | - Py_DECREF(r); | ||
| 161 | - return NULL; | ||
| 160 | + Py_DECREF(r); | ||
| 161 | + return NULL; | ||
| 162 | 162 | } | |
| 163 | 163 | ||
| 164 | 164 | PyTuple_SET_ITEM(r, 0, v); | |
| 165 | 165 | ||
| 166 | 166 | if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_interval)))) { | |
| 167 | - Py_DECREF(r); | ||
| 168 | - return NULL; | ||
| 167 | + Py_DECREF(r); | ||
| 168 | + return NULL; | ||
| 169 | 169 | } | |
| 170 | 170 | ||
| 171 | 171 | PyTuple_SET_ITEM(r, 1, v); | |
@@ -1479,9 +1479,9 @@ PyInit__signal(void) | |||
| 1479 | 1479 | ||
| 1480 | 1480 | #if defined (HAVE_SETITIMER) || defined (HAVE_GETITIMER) | |
| 1481 | 1481 | ItimerError = PyErr_NewException("signal.ItimerError", | |
| 1482 | - PyExc_IOError, NULL); | ||
| 1482 | + PyExc_IOError, NULL); | ||
| 1483 | 1483 | if (ItimerError != NULL) | |
| 1484 | - PyDict_SetItemString(d, "ItimerError", ItimerError); | ||
| 1484 | + PyDict_SetItemString(d, "ItimerError", ItimerError); | ||
| 1485 | 1485 | #endif | |
| 1486 | 1486 | ||
| 1487 | 1487 | #ifdef CTRL_C_EVENT | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1967,12 +1967,13 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret) | |||
| 1967 | 1967 | return 1; | |
| 1968 | 1968 | } | |
| 1969 | 1969 | #endif /* AF_UNIX */ | |
| 1970 | + | ||
| 1970 | 1971 | #if defined(AF_NETLINK) | |
| 1971 | - case AF_NETLINK: | ||
| 1972 | - { | ||
| 1973 | - *len_ret = sizeof (struct sockaddr_nl); | ||
| 1974 | - return 1; | ||
| 1975 | - } | ||
| 1972 | + case AF_NETLINK: | ||
| 1973 | + { | ||
| 1974 | + *len_ret = sizeof (struct sockaddr_nl); | ||
| 1975 | + return 1; | ||
| 1976 | + } | ||
| 1976 | 1977 | #endif | |
| 1977 | 1978 | ||
| 1978 | 1979 | #ifdef AF_RDS | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -697,8 +697,9 @@ PyTypeObject PyFunction_Type = { | |||
| 697 | 697 | To declare a class method, use this idiom: | |
| 698 | 698 | ||
| 699 | 699 | class C: | |
| 700 | - def f(cls, arg1, arg2, ...): ... | ||
| 701 | - f = classmethod(f) | ||
| 700 | + @classmethod | ||
| 701 | + def f(cls, arg1, arg2, ...): | ||
| 702 | + ... | ||
| 702 | 703 | ||
| 703 | 704 | It can be called either on the class (e.g. C.f()) or on an instance | |
| 704 | 705 | (e.g. C().f()); the instance is ignored except for its class. | |
@@ -808,8 +809,9 @@ just like an instance method receives the instance.\n\ | |||
| 808 | 809 | To declare a class method, use this idiom:\n\ | |
| 809 | 810 | \n\ | |
| 810 | 811 | class C:\n\ | |
| 811 | - def f(cls, arg1, arg2, ...): ...\n\ | ||
| 812 | - f = classmethod(f)\n\ | ||
| 812 | + @classmethod\n\ | ||
| 813 | + def f(cls, arg1, arg2, ...):\n\ | ||
| 814 | + ...\n\ | ||
| 813 | 815 | \n\ | |
| 814 | 816 | It can be called either on the class (e.g. C.f()) or on an instance\n\ | |
| 815 | 817 | (e.g. C().f()). The instance is ignored except for its class.\n\ | |
@@ -880,8 +882,9 @@ PyClassMethod_New(PyObject *callable) | |||
| 880 | 882 | To declare a static method, use this idiom: | |
| 881 | 883 | ||
| 882 | 884 | class C: | |
| 883 | - def f(arg1, arg2, ...): ... | ||
| 884 | - f = staticmethod(f) | ||
| 885 | + @staticmethod | ||
| 886 | + def f(arg1, arg2, ...): | ||
| 887 | + ... | ||
| 885 | 888 | ||
| 886 | 889 | It can be called either on the class (e.g. C.f()) or on an instance | |
| 887 | 890 | (e.g. C().f()); the instance is ignored except for its class. | |
@@ -986,8 +989,9 @@ A static method does not receive an implicit first argument.\n\ | |||
| 986 | 989 | To declare a static method, use this idiom:\n\ | |
| 987 | 990 | \n\ | |
| 988 | 991 | class C:\n\ | |
| 989 | - def f(arg1, arg2, ...): ...\n\ | ||
| 990 | - f = staticmethod(f)\n\ | ||
| 992 | + @staticmethod\n\ | ||
| 993 | + def f(arg1, arg2, ...):\n\ | ||
| 994 | + ...\n\ | ||
| 991 | 995 | \n\ | |
| 992 | 996 | It can be called either on the class (e.g. C.f()) or on an instance\n\ | |
| 993 | 997 | (e.g. C().f()). The instance is ignored except for its class.\n\ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1657,16 +1657,16 @@ SelectPythonDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 1657 | 1657 | PropSheet_SetWizButtons(GetParent(hwnd), | |
| 1658 | 1658 | PSWIZB_BACK | PSWIZB_NEXT); | |
| 1659 | 1659 | /* Get the python directory */ | |
| 1660 | - ivi = (InstalledVersionInfo *) | ||
| 1660 | + ivi = (InstalledVersionInfo *) | ||
| 1661 | 1661 | SendDlgItemMessage(hwnd, | |
| 1662 | - IDC_VERSIONS_LIST, | ||
| 1663 | - LB_GETITEMDATA, | ||
| 1664 | - id, | ||
| 1665 | - 0); | ||
| 1666 | - hkey_root = ivi->hkey; | ||
| 1667 | - strcpy(python_dir, ivi->prefix); | ||
| 1668 | - SetDlgItemText(hwnd, IDC_PATH, python_dir); | ||
| 1669 | - /* retrieve the python version and pythondll to use */ | ||
| 1662 | + IDC_VERSIONS_LIST, | ||
| 1663 | + LB_GETITEMDATA, | ||
| 1664 | + id, | ||
| 1665 | + 0); | ||
| 1666 | + hkey_root = ivi->hkey; | ||
| 1667 | + strcpy(python_dir, ivi->prefix); | ||
| 1668 | + SetDlgItemText(hwnd, IDC_PATH, python_dir); | ||
| 1669 | + /* retrieve the python version and pythondll to use */ | ||
| 1670 | 1670 | result = SendDlgItemMessage(hwnd, IDC_VERSIONS_LIST, | |
| 1671 | 1671 | LB_GETTEXTLEN, (WPARAM)id, 0); | |
| 1672 | 1672 | pbuf = (char *)malloc(result + 1); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments