##// END OF EJS Templates
osutil: fix up check-code issues
Matt Mackall -
r13736:f3c4421e default
parent child Browse files
Show More
@@ -177,7 +177,7 b' cpats = ['
177 (r'\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
177 (r'\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
178 (r'\S+ (\+\+|--)', "use foo++, not foo ++"),
178 (r'\S+ (\+\+|--)', "use foo++, not foo ++"),
179 (r'\w,\w', "missing whitespace after ,"),
179 (r'\w,\w', "missing whitespace after ,"),
180 (r'\w[+/*]\w', "missing whitespace in expression"),
180 (r'^[^#]\w[+/*]\w', "missing whitespace in expression"),
181 (r'^#\s+\w', "use #foo, not # foo"),
181 (r'^#\s+\w', "use #foo, not # foo"),
182 (r'[^\n]\Z', "no trailing newline"),
182 (r'[^\n]\Z', "no trailing newline"),
183 ]
183 ]
@@ -519,14 +519,14 b' bail:'
519
519
520 static PyObject *isgui(PyObject *self)
520 static PyObject *isgui(PyObject *self)
521 {
521 {
522 CFDictionaryRef dict = CGSessionCopyCurrentDictionary();
522 CFDictionaryRef dict = CGSessionCopyCurrentDictionary();
523
523
524 if (dict != NULL) {
524 if (dict != NULL) {
525 CFRelease(dict);
525 CFRelease(dict);
526 return Py_True;
526 return Py_True;
527 } else {
527 } else {
528 return Py_False;
528 return Py_False;
529 }
529 }
530 }
530 }
531 #endif
531 #endif
532
532
@@ -541,10 +541,10 b' static PyMethodDef methods[] = {'
541 "On error, this function may raise either a WindowsError or an IOError."},
541 "On error, this function may raise either a WindowsError or an IOError."},
542 #endif
542 #endif
543 #ifdef __APPLE__
543 #ifdef __APPLE__
544 {
544 {
545 "isgui", (PyCFunction)isgui, METH_NOARGS,
545 "isgui", (PyCFunction)isgui, METH_NOARGS,
546 "Is a CoreGraphics session available?"
546 "Is a CoreGraphics session available?"
547 },
547 },
548 #endif
548 #endif
549 {NULL, NULL}
549 {NULL, NULL}
550 };
550 };
General Comments 0
You need to be logged in to leave comments. Login now