| 291 | } |
| 292 | |
| 293 | MTypeObject* MUtils::BoxVariantType(const VariantType& value) |
| 294 | { |
| 295 | if (value.Type == VariantType::Null) |
| 296 | return nullptr; |
| 297 | MClass* klass = GetClass(value); |
| 298 | if (!klass) |
| 299 | { |
| 300 | LOG(Error, "Invalid native type to box {0}", value); |
| 301 | return nullptr; |
| 302 | } |
| 303 | MType* mType = klass->GetType(); |
| 304 | return INTERNAL_TYPE_GET_OBJECT(mType); |
| 305 | } |
| 306 | |
| 307 | Variant MUtils::UnboxVariant(MObject* value) |
| 308 | { |