Skip to content

Add stdArray.CreateFromArrayByRef ownership transfer - #188

Open
sancarn wants to merge 3 commits into
masterfrom
feature/122-array-byref
Open

sancarn wants to merge 3 commits into
masterfrom
feature/122-array-byref

Conversation

@sancarn

@sancarn sancarn commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Add experimental Windows stdArray.CreateFromArrayByRef(arr) to transfer ownership of a one-dimensional Variant array without copying its elements. The source becomes unallocated; the resulting list uses DefaultBase and supports normal mutations. Existing copying constructors and .arr retain their behavior.

Reject fixed-size, locked, multidimensional, empty and unallocated arrays before transfer. Accept both declared Variant() arrays and Variants containing arrays. Keep implementation self-contained, update generated documentation and changelog, and add regression coverage for ownership, source reuse, strings, objects, nested arrays, growth, cloning and rejected inputs.

Validation: python Tools/Testing/run.py --suite stdArray passed in isolated Windows Excel; exact Office/VBE registry settings restored. Documentation generator run; all existing stdArray documentation preserved and unrelated baseline generator drift excluded. Edited files checked for CRLF; whitespace check passed with cr-at-eol. Mac explicitly rejects this API; Windows 32-bit and legacy VBA remain unverified.

Breaking changes: none identified. Ownership transfer and source invalidation apply only to the new opt-in constructor.

Closes #122.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] stdArray add mechanism for copying an array byref

1 participant