Displaying 1 result from an estimated 1 matches for "old_r_readconsol".
Did you mean:
old_r_readconsole
2014 Oct 27
0
Calling the original function after tweaking arguments is an incorrect use of the R-API?
...nsole?
Compiled code should not call non-API entry points in R.
The concerned file is this:
https://github.com/musically-ut/extPrompt/blob/master/src/extPrompt.c and
occurs on line 38, I think.
void extPrompt() {
> // Initialize the plugin by replacing the R_ReadConsole function
> old_R_ReadConsole = ptr_R_ReadConsole;
> ptr_R_ReadConsole = extPrompt_ReadConsole;
> // ...
> }
> int extPrompt_ReadConsole(const char *old_prompt, unsigned char *buf, int
> len,
> int addtohistory) {
> // ...
> // Call the old function with the `new_prompt`
>...