diff options
author | Jan Jezabek <jezabek@poczta.onet.pl> | 2009-06-23 19:35:15 +0000 |
---|---|---|
committer | Jan Jezabek <jezabek@poczta.onet.pl> | 2009-06-23 19:35:15 +0000 |
commit | f24e2d5b6c434b24b390ebfc9d4db396fa887341 (patch) | |
tree | 486aa6058ea96a03b9c5dbda4804e64084bafa1c | |
parent | ff0e5a1ddf3b4740a3c73629037c92ebdff78b88 (diff) | |
download | swig-f24e2d5b6c434b24b390ebfc9d4db396fa887341.tar.gz |
Add keyword warnings for COM.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-jezabek@11307 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r-- | Lib/com/com.swg | 2 | ||||
-rw-r--r-- | Lib/com/comkw.swg | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Lib/com/com.swg b/Lib/com/com.swg index e2372de7c..1b3d876ba 100644 --- a/Lib/com/com.swg +++ b/Lib/com/com.swg @@ -1231,3 +1231,5 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, %} +/* COM IDL keywords */ +%include <comkw.swg> diff --git a/Lib/com/comkw.swg b/Lib/com/comkw.swg new file mode 100644 index 000000000..66266989d --- /dev/null +++ b/Lib/com/comkw.swg @@ -0,0 +1,16 @@ +#define IDLKW(x) %keywordwarn("'" `x` "' is a COM IDL keyword, renaming to '_" `x` "'", rename="_%s") `x` + +/* + * This list may be incomplete. This is because most IDL keywords may be used as function/parameter + * names, e.g. uuid, id, etc. Unfortunately this means that reserved names need to be found by + * trial and error (and may be IDL compiler specific). + */ + +IDLKW(coclass); +IDLKW(import); +IDLKW(importlib); +IDLKW(interface); +IDLKW(library); +IDLKW(module); + +#undef IDLKW |