Branch: Tag:

2001-01-26

2001-01-26 18:53:23 by Martin Stjernholm <mast@lysator.liu.se>

Fix for the special case when the program cache size is set to zero.

Rev: server/modules/scripting/piketag.pike:2.29

7:   // return "Hello world!\n";   // </pike>    - constant cvs_version = "$Id: piketag.pike,v 2.28 2000/10/18 01:50:38 mast Exp $"; + constant cvs_version = "$Id: piketag.pike,v 2.29 2001/01/26 18:53:23 mast Exp $";   constant thread_safe=1;      inherit "module";
293:    else    pre += data;    program p = compile_string(R(pre), fn); +  if (query ("program_cache_limit") > 0)    program_cache[ s ] = p;       cnt=0;
475:    for(i = query("program_cache_limit")/2; i > 0; i--)    m_delete(program_cache, a[random(sizeof(a))]);    } +  if (query ("program_cache_limit") > 0)    program_cache[s] = p;    }    })