On Fri, Mar 26, 2004 at 11:37:40PM +0100, Xavier Beaudouin wrote:
Before (on 7.2 and in 7.4) it has used to work, but today on Pike 7.5 it has suddenlt stopped to work...
The problem is a bit different, I guess. Actually, in Pike 7.2/7.4 it was enough to use add_function() (not add_function_constant()) to make function visible outside, but this behavior was changed somewhere in 7.5. I've no idea why, but there was some discussion concerning this topic (I posted similar question).
But, because I don't (yet) know - what is correct - to use plain add_function() or add_function_constant(), it is difficult to say - is this change normal or not (was it a bug or feature?) :)
What is interesting, if add_function() is used outside start_new_program(), and then this module is inherited (from Pike code), everything is like it was before (even in 7.5) - so, actually, it affects only those modules which are used directly (without "transitional" Pike module).
Say, I've:
add_function("blabla", f_blabla, ...); and then, instead of using Blabla.so directly, use it through Blabla.pmod:
inherit _Blabla; // Where _Blabla.so is our module and then, I use it like Blabla.blabla - it will behave as expected (i.e. function is constant) in Pike 7.2/7.4/7.5 (at least, this is what I figured from my tests).
Regards, /Al