Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: avm1/avm2: Change TDisplayObject::object1/2 return type to Option<Object> #19522

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

moulins
Copy link
Contributor

@moulins moulins commented Feb 15, 2025

  • Rename TDisplayObject::object to object1, for better symmetry with object2;
  • Return Option<Object> instead of Value from these methods, to better reflect what's actually allowed;
  • Add Value::{or_null, or_undef} helper constructors.

@moulins moulins added A-avm2 Area: AVM2 (ActionScript 3) A-avm1 Area: AVM1 (ActionScript 1 & 2) T-refactor Type: Refactor / Cleanup labels Feb 15, 2025
Add `avm1::Value::{or_null, or_undef}` to make dealing with the
optionality more palatable.
Add `avm2::Value::or_null` to make dealing with the optionality more palatable.
@moulins moulins force-pushed the display-object-opt-avm-objects branch from 56b4ad6 to 04327a1 Compare February 15, 2025 01:21
@moulins moulins changed the title avm1/avm2: Change TDisplayObject::object1/2 return type to Option<Object> DRAFT: avm1/avm2: Change TDisplayObject::object1/2 return type to Option<Object> Feb 16, 2025
@moulins moulins marked this pull request as draft February 16, 2025 07:40
@kjarosh kjarosh added A-core Area: Core player, where no other category fits and removed A-avm2 Area: AVM2 (ActionScript 3) A-avm1 Area: AVM1 (ActionScript 1 & 2) labels Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants