roxen.lists.pike.general

Subject Author Date
strange behaviour of pike 7.8? Thomas Bopp <astra[at]uni-paderborn[dot]de> 02-05-2009
Hi there!

I tried to get sTeam working with latest pike. In general, pike error  
handling looks really much better and I found some real problems!

Unfortunately, there are some problem left: Got some void return from  
none-void functions here that are void?!
tmp/libraries/Messaging.pmod:893:Must return a value for a non-void  
function.
tmp/libraries/Messaging.pmod:893:Expected: mixed.
tmp/libraries/Messaging.pmod:893:Got     : void.

[...]
  void update()
   {
      	if(iIsAttachment) return;
[...]

how is that mixed?

also for example:
tmp/classes/User.pike:1471:Must return a value for a non-void function.
tmp/classes/User.pike:1471:Expected: mixed.
tmp/classes/User.pike:1471:Got     : void.

void add_trail(object visit, int max_size)
{
     array aTrail = do_query_attribute("trail");
     if ( !arrayp(aTrail) )
         aTrail = ({ visit });
     else {
         if ( visit == aTrail[-1] )
             return; /* this is 1471 */
	aTrail += ({ visit });
         if ( sizeof(aTrail) > max_size )
             aTrail = aTrail[sizeof(aTrail)-max_size..];
     }
     set_attribute("trail", aTrail);
}

I think add_trail is also not defined anywhere else.