For Pike 7.5, you should use PIKE_MODULE_INIT, not "void pike_module_init( void )". This works in 7.4 too.
Although I bet your actual problem is that C modules are now programs, not objects. So you need to instantiate them before accessing non-constant members. This is the most brain-damaged aspect of 7.5.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2004-03-26 23:38: Subject: ADD_FUNCTION() macro on pike 7.5 ?
Hello there,
Does ADD_FUNCTION macro still works outside the program scope on the module level in a Pike C module (not in a cmod) ? We have currently issues in our Caudium C module... and it seems that the following code has stopped to work :
main.c
/* ... */
void pike_module_init( void ) {
/* some other add_function_constant() */
add_function_constant( "http_date", f_http_date, "function(int|void:string)", 0);
/* */
init_external_module();
/* */
}
in external.c we have :
void init_external_module (void) {
ADD_FUNCTION("whatever",f_whatever, tFunc(tVoid, tInt), 0);
}
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...
Is this normal ?
/Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. President of Kazar Organization : http://www.kazar.net/ Please visit http://caudium.net/, home of Caudium & Camas projects
/ Brevbäraren