Lines Matching refs:writeline
24 def writeline(file, line=None):
45 writeline(global_functions_hdr, line)
47 writeline(global_functions_hdr, " * Automatically generated by build_glob.py.")
48 writeline(global_functions_hdr, " * Do not modify the previous line.")
49 writeline(global_functions_hdr, " */")
50 writeline(global_functions_hdr)
56 writeline(global_functions_impl, line)
58 writeline(global_functions_impl, " * Automatically generated by build_glob.py.")
59 writeline(global_functions_impl, " * Do not modify the previous line.")
60 writeline(global_functions_impl, " */")
61 writeline(global_functions_impl)
70 writeline(global_functions_hdr)
77 writeline(global_functions_hdr,";")
78 writeline(global_functions_hdr, "#ifdef LIBXML_THREAD_ENABLED")
79 writeline(global_functions_hdr,"#define "+fields[1]+" \\")
80 writeline(global_functions_hdr,"(*(__"+fields[1]+"()))")
81 writeline(global_functions_hdr,"#else")
83 writeline(global_functions_hdr,"LIBXML_DLL_IMPORT extern "+fields[0]+" "+fields[1]+fields[2]+";")
85 writeline(global_functions_hdr,"LIBXML_DLL_IMPORT extern "+fields[0]+" "+fields[1]+";")
86 writeline(global_functions_hdr,"#endif")
89 writeline(global_functions_hdr,fields[0]+" "+fields[1][:3]+"ThrDef"+fields[1][3:]+"("+fields[0]+" v);")
91 writeline(global_functions_impl)
92 # writeline(global_functions_impl, "extern "+fields[0]+" "+fields[1]+";")
93 writeline(global_functions_impl, "#undef\t"+fields[1])
94 writeline(global_functions_impl, fields[0]+" *")
99 writeline(global_functions_impl, ")[]")
100 writeline(global_functions_impl, " {")
101 writeline(global_functions_impl, " if (IS_MAIN_THREAD)")
102 writeline(global_functions_impl, "\treturn (&"+fields[1]+");")
103 writeline(global_functions_impl, " else")
104 writeline(global_functions_impl, "\treturn (&xmlGetGlobalState()->"+fields[1]+");")
105 writeline(global_functions_impl, "}")
108 writeline(global_functions_impl,fields[0]+" "+fields[1][:3]+"ThrDef"+fields[1][3:]+"("+fields[0]+" v) {")
109 writeline(global_functions_impl," "+fields[0]+" ret;");
110 writeline(global_functions_impl," xmlMutexLock(xmlThrDefMutex);")
111 writeline(global_functions_impl," ret = "+fields[1][:3]+fields[1][3:]+"ThrDef;")
112 writeline(global_functions_impl," "+fields[1][:3]+fields[1][3:]+"ThrDef = v;")
113 writeline(global_functions_impl," xmlMutexUnlock(xmlThrDefMutex);")
114 writeline(global_functions_impl," return ret;")
115 writeline(global_functions_impl,"}")
117 writeline(global_functions_hdr)
118 writeline(global_functions_hdr, "#ifdef __cplusplus")
119 writeline(global_functions_hdr, "}")
120 writeline(global_functions_hdr, "#endif")
121 writeline(global_functions_hdr)
122 writeline(global_functions_hdr, "#endif /* __XML_GLOBALS_H */")