pike.git / lib / modules / Thread.pmod

version» Context lines:

pike.git/lib/modules/Thread.pmod:335: Inside #if constant(thread_create)
   case 0:    ret = ({});    break;       case 1:    ret=buffer[r_ptr..r_ptr];    buffer[r_ptr++] = 0; // Throw away any references.    break;       default: -  ret = buffer[r_ptr..w_ptr]; +  ret = buffer[r_ptr..w_ptr-1];    r_ptr = w_ptr = 0;    buffer=allocate(sizeof(buffer)); // Throw away any references.    break;    }       return ret;    }       //! This function returns all values in the queue as an array. The    //! values in the array will be in the order they were written. If
pike.git/lib/modules/Thread.pmod:895:    case 0:    ret = ({});    break;       case 1:    ret=buffer[r_ptr..r_ptr];    buffer[r_ptr++] = 0; // Throw away any references.    break;       default: -  ret = buffer[r_ptr..w_ptr]; +  ret = buffer[r_ptr..w_ptr-1];    r_ptr = w_ptr = 0;    buffer=allocate(sizeof(buffer)); // Throw away any references.    break;    }       return ret;    }       int write(mixed value)    {