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 |
|
|
522 | CFDictionaryRef dict = CGSessionCopyCurrentDictionary(); | |
523 |
|
523 | |||
524 |
|
|
524 | if (dict != NULL) { | |
525 |
|
|
525 | CFRelease(dict); | |
526 |
|
|
526 | return Py_True; | |
527 |
|
|
527 | } else { | |
528 |
|
|
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 |
|
|
545 | "isgui", (PyCFunction)isgui, METH_NOARGS, | |
546 |
|
|
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