Bug 676649 - Include jspubtd.h automagically when necessary in IDL files; r=khuey

This commit is contained in:
Ms2ger
2011-08-08 17:14:34 +02:00
parent a2c731af85
commit 96f9ccc2c4
2 changed files with 30 additions and 0 deletions

View File

@@ -178,6 +178,10 @@ include = """
#endif
"""
jspubtd_include = """
#include "jspubtd.h"
"""
header_end = """/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
@@ -207,6 +211,9 @@ def print_header(idl, fd, filename):
fd.write('\n')
fd.write(include % {'basename': idl_basename(inc.filename)})
if idl.needsJSTypes():
fd.write(jspubtd_include)
fd.write('\n')
fd.write(header_end)