resurrect -spam

This commit is contained in:
David Rose 2002-11-27 21:33:27 +00:00
parent 8085d3eca9
commit c77fcbe00a
4 changed files with 25 additions and 4 deletions

View File

@ -754,3 +754,19 @@ hash_function_signature(FunctionRemap *remap) {
remap->_hash = hash;
}
////////////////////////////////////////////////////////////////////
// Function: InterfaceMaker::write_spam_message
// Access: Protected
// Description: Generates a string to output a spammy message to
// notify indicating we have just called this function.
////////////////////////////////////////////////////////////////////
void InterfaceMaker::
write_spam_message(ostream &out, FunctionRemap *remap) const {
out <<
" if (interrogatedb_cat.is_spam()) {\n"
" interrogatedb_cat.spam() << \"";
remap->write_orig_prototype(out, 0);
out << "\\n\";\n"
" }\n";
}

View File

@ -138,6 +138,7 @@ protected:
void output_ref(ostream &out, int indent_level, FunctionRemap *remap,
const string &varname) const;
void write_spam_message(ostream &out, FunctionRemap *remap) const;
protected:
InterrogateModuleDef *_def;

View File

@ -192,8 +192,10 @@ write_function_instance(ostream &out, InterfaceMaker::Function *func,
write_function_header(out, func, remap, true);
out << " {\n";
// write_spam_message(def_index, out);
if (generate_spam) {
write_spam_message(out, remap);
}
string return_expr =
remap->call_function(out, 2, true, "param0");

View File

@ -233,8 +233,10 @@ write_function_instance(ostream &out, InterfaceMaker::Function *func,
out << "PyObject *\n"
<< remap->_wrapper_name << "(PyObject *, PyObject *args) {\n";
// write_spam_message(def_index, out);
if (generate_spam) {
write_spam_message(out, remap);
}
string format_specifiers;
string parameter_list;