osutil: replace #import with #include, and add a check for it
author |
Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
date |
Wed, 23 Mar 2011 23:05:32 +0100 |
parents |
cede00420e1e |
children |
8bb03283e9b9 |
files |
contrib/check-code.py mercurial/osutil.c |
diffstat |
2 files changed, 2 insertions(+), 1 deletions(-)
[+]
|
line diff
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -180,6 +180,7 @@
(r'^[^#]\w[+/*]\w', "missing whitespace in expression"),
(r'^#\s+\w', "use #foo, not # foo"),
(r'[^\n]\Z', "no trailing newline"),
+ (r'^\s*#import\b', "use only #include in standard C code"),
]
cfilters = [
--- a/mercurial/osutil.c
+++ b/mercurial/osutil.c
@@ -515,7 +515,7 @@
#endif
#ifdef __APPLE__
-#import <ApplicationServices/ApplicationServices.h>
+#include <ApplicationServices/ApplicationServices.h>
static PyObject *isgui(PyObject *self)
{