pike.git
/
lib
/
master.pike.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/master.pike.in:937:
#undef CPP_OPT local::create(options); } #endif } } protected CompilerEnvironment DefaultCompilerEnvironment = CompilerEnvironment();
+
//! @decl CompilationHandler get_active_compilation_handler()
+
//!
+
//! Returns the currently active compilation compatibility handler, or
+
//! @tt{0@} (zero) if none is active.
+
//!
+
//! @note
+
//! This function should only be used during a call of @[compile()].
+
//!
+
//! @seealso
+
//! @[get_active_error_handler()], @[compile()],
+
//! @[master()->get_compilation_handler()], @[CompilationHandler]
+
protected object get_active_compilation_handler()
+
{
+
CompilerEnvironment.PikeCompiler c = get_active_compiler();
+
return c && c->compat_handler;
+
}
+
+
//! @decl CompilationHandler get_active_error_handler()
+
//!
+
//! Returns the currently active compilation error handler
+
//! (second argument to @[compile()]), or @tt{0@} (zero) if none
+
//! is active.
+
//!
+
//! @note
+
//! This function should only be used during a call of @[compile()].
+
//!
+
//! @seealso
+
//! @[get_active_compilation_handler()], @[compile()], @[CompilationHandler]
+
protected object get_active_error_handler()
+
{
+
CompilerEnvironment.PikeCompiler c = get_active_compiler();
+
return c && c->handler;
+
}
+
protected string cpp(string data, mapping|string|void current_file, int|string|void charset, object|void handler, void|int compat_major, void|int compat_minor, void|int picky_cpp) { CompilerEnvironment.CPP cpp_obj = DefaultCompilerEnvironment->CPP(current_file, charset, handler || UNDEFINED, compat_major, compat_minor, picky_cpp);
pike.git/lib/master.pike.in:2189:
//! @decl int cp(string from, string to) //! //! Copies the file @[from] to the new position @[to]. This is an //! alias for @[Stdio.cp]. /* Note that create is called before add_precompiled_program */ protected void create() {
+
add_constant("get_active_compilation_handler", get_active_compilation_handler);
+
add_constant("get_active_error_handler", get_active_error_handler);
add_constant("CompilerEnvironment", CompilerEnvironment); add_constant("DefaultCompilerEnvironment", DefaultCompilerEnvironment); add_constant("cpp", cpp); foreach(master_efuns, string e) if (has_index(this, e)) add_constant(e, this[e]); else error("Function %O is missing from master.pike.\n", e);