Esempio n. 1
0
static Variant reduce_func(CVarRef result, CVarRef operand, const void *data) {
  CallCtx* ctx = (CallCtx*)data;
  Variant ret;
  TypedValue args[2];
  tvDup(*result.asTypedValue(), args[0]);
  tvDup(*operand.asTypedValue(), args[1]);
  g_vmContext->invokeFuncFew(ret.asTypedValue(), *ctx, 2, args);
  return ret;
}
Esempio n. 2
0
static void walk_func(VRefParam value, CVarRef key, CVarRef userdata,
                      const void *data) {
  CallCtx* ctx = (CallCtx*)data;
  Variant sink;
  TypedValue args[3];
  tvDup(*value->asTypedValue(), args[0]);
  tvDup(*key.asTypedValue(), args[1]);
  tvDup(*userdata.asTypedValue(), args[2]);
  g_vmContext->invokeFuncFew(sink.asTypedValue(), *ctx, 3, args);
}
Esempio n. 3
0
static bool filter_func(CVarRef value, const void *data) {
  CallCtx* ctx = (CallCtx*)data;
  Variant ret;
  TypedValue args[1];
  tvDup(*value.asTypedValue(), args[0]);
  g_vmContext->invokeFuncFew((TypedValue*)&ret, *ctx, 1, args);
  return ret.toBoolean();
}
Object c_StaticResultWaitHandle::ti_create(CVarRef result) {
  return Create(result.asTypedValue());
}