예제 #1
0
BucketBrigade::BucketBrigade(const String& data) {
  PackedArrayInit ai(2);
  ai.append(data);
  ai.append(data.length());
  auto bucket = g_context->createObject(s_bucket_class.get(), ai.toArray());
  appendBucket(Object::attach(bucket));
}
예제 #2
0
struct bucket *createAndAppendBucket(struct bucketString *pStr) {
    struct bucket *pBkt;

    if (pStr == NULL) return NULL;

    /* Initialize and append new bucket */
    pBkt = newBucket(pStr->defSize);
    appendBucket(pStr, pBkt);

    return pBkt;
}
예제 #3
0
void HHVM_FUNCTION(stream_bucket_append, const Resource& bb_res, const Object& bucket) {
  auto brigade = bb_res.getTyped<BucketBrigade>();
  assert(brigade);
  brigade->appendBucket(bucket);
}
예제 #4
0
void HHVM_FUNCTION(stream_bucket_append, CResRef bb_res, CObjRef bucket) {
  auto brigade = bb_res.getTyped<BucketBrigade>();
  assert(brigade);
  brigade->appendBucket(bucket);
}