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