Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migration of ZString, ZArray, ZObject to EBox#208

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jmjoy merged 6 commits intophper-framework:masterfromjmjoy:merge
Jun 6, 2025

Conversation

jmjoy
Copy link
Member

@jmjoyjmjoy commentedJun 5, 2025
edited
Loading

This pull request introduces significant refactoring across multiple components of the codebase to enhance memory management, improve type safety, and simplify the implementation of core structures. Key changes include transitioning to theEBox smart pointer for memory management, streamlining object and array handling, and updating type conversions for better compatibility with the Zend Engine.

Memory Management Improvements:

  • IntroducedEBox<T> inphper/src/alloc.rs as a smart pointer for PHP values allocated in Zend Engine memory, replacing manual memory management. It handles deallocation automatically and provides safe access to PHP resources.
  • UpdatedZObject andStateObject<T> inphper/src/objects.rs to useEBox<T> for memory management, simplifying their implementation and ensuring proper cleanup.[1][2]

Array Handling Enhancements:

  • RefactoredZArray inphper/src/arrays.rs to useEBox<ZArr> for memory management, replacing manual pointer handling and improving safety.[1][2]
  • Added aDrop implementation forZArr to ensure proper memory cleanup when arrays are destroyed.

Type Conversion Updates:

  • Standardized pointer casting for type conversions across the codebase to ensure compatibility with Zend Engine APIs. Examples include updates inphper/src/classes.rs,phper/src/functions.rs, andphper/src/objects.rs.[1][2][3]

Test Improvements:

  • Added an assertion to verify HTTP response status codes in integration tests for the HTTP server.

Documentation and Cleanup:

  • Removed outdatedebox! macro and associatedEBox implementation fromphper-alloc/src/lib.rs andphper-alloc/src/macros.rs. These have been replaced with the newEBox implementation inphper/src/alloc.rs.[1][2]
  • Updated documentation forZObject andStateObject<T> to reflect their new implementations usingEBox.[1][2]

@jmjoyjmjoy marked this pull request as ready for reviewJune 6, 2025 01:19
@jmjoyjmjoy merged commit9e1f1d0 intophper-framework:masterJun 6, 2025
22 checks passed
@jmjoyjmjoy deleted the merge branchJune 6, 2025 01:19
@github-actionsgithub-actionsbot mentioned this pull requestJul 3, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@jmjoy

[8]ページ先頭

©2009-2025 Movatter.jp