pike.git / lib / modules / Sql.pmod / pgsql_util.pmod

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:388:   class conxiin {    inherit Stdio.Buffer:i;       final Thread.Condition fillread;    final MUTEX fillreadmux;    final int procmsg;    private int didreadcb;       protected final bool range_error(int howmuch) {   #ifdef PG_DEBUG -  if (howmuch <= 0) -  error("Out of range %d\n", howmuch); +  if (howmuch < 0) { +  int available = unread(0); +  unread(available); +  error("Out of range %d %O %O\n", howmuch, +  ((string)this)[.. available-1], ((string)this)[available ..]); +  }   #endif    if (fillread) {    Thread.MutexKey lock = fillreadmux->lock();    if (!didreadcb)    fillread.wait(lock);    didreadcb = 0;    } else    throw(MAGICTERMINATE);    return true;    }