Beispiel #1
0
void QoreValueList::insert(QoreValue val) {
   assert(reference_count() == 1);
   priv->resize(priv->length + 1);
   if (priv->length - 1)
      memmove(priv->entry + 1, priv->entry, sizeof(QoreValue) * (priv->length - 1));
   priv->entry[0] = val;
   if (val.hasNode() && get_container_obj(val.getInternalNode()))
      priv->incObjectCount(1);
}
Beispiel #2
0
void QoreValueList::merge(const QoreValueList* list) {
   assert(reference_count() == 1);
   int start = priv->length;
   priv->resize(priv->length + list->priv->length);
   for (size_t i = 0; i < list->priv->length; i++) {
      QoreValue p = list->priv->entry[i];
      priv->entry[start + i] = p.refSelf();
      if (p.hasNode() && get_container_obj(p.getInternalNode()))
	 priv->incObjectCount(1);
   }
}
Beispiel #3
0
QoreValue copy_value_and_resolve_lvar_refs(QoreValue& n, ExceptionSink* xsink) {
   if (!n.hasNode())
      return n;
   return copy_and_resolve_lvar_refs(n.getInternalNode(), xsink);
}