It is possible to redefine functions and global variables (in this case new definitions step over old ones) under certain conditions, essentially for debug reasons, but it is not possible to change function or global variable profiles. Thus, you cannot change a function return value type, nor its parameters number and their types, nor the type of a global variable (dimensions included). Neither is it possible to redefine an active function, or to redefine predefined functions.
void remove_function_definition(void * pfunc)
The first way to redefine a function is to undefine it, and then to give it
its new definition.
After a remove\_
function\_
definition call, the function whose
name is given as argument remains simply undeclared. However, it is not
possible to undefine an active function (during its execution), nor to
undefine a predefined function.
Obviously, this way is cumbersome when you want to redefine several functions, for instance when you want to reload a file. In this case you will probably prefer the following function:
After a debug\_
mode call with a non null argument, you can redefine
your functions and global variables. If the argument is greater than 1,
redefinitions are signaled by a warning. After debug\_
mode call
with zero as argument you cannot make redefinitions anymore.