Skip to content

[pull] master from php:master#392

Merged
pull[bot] merged 5 commits intoturkdevops:masterfrom
php:master
Sep 22, 2025
Merged

[pull] master from php:master#392
pull[bot] merged 5 commits intoturkdevops:masterfrom
php:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Sep 22, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

iluuu1994 and others added 5 commits September 22, 2025 10:55
* PHP-8.3:
  Fix curl 8.16.0 compilation with zts
* PHP-8.4:
  Fix curl 8.16.0 compilation with zts
* uri: Inline `uri_internal_from_obj()` and `Z_URI_INTERNAL_P()`

Changes performed with Coccinelle with some minor adjustments in places where
it choked due to macros:

    @@
    expression e;
    @@

    - Z_URI_INTERNAL_P(e)
    + &Z_URI_OBJECT_P(e)->internal

    @@
    expression e;
    @@

    - uri_internal_from_obj(e)
    + &uri_object_from_obj(e)->internal

* uri: Inline definition of `URI_ASSERT_INITIALIZATION()`

While a `NULL` pointer to `zend_object` would result in `->internal` also
sitting at `0`, this is not a particularly useful assertion to have. Instead
just assert that we have a parsed `->uri` available.

Changes made with Coccinelle + some manual adjustments:

    @@
    uri_internal_t *u;
    expression e;
    @@

     u = &Z_URI_OBJECT_P(e)->internal
    ... when != u
    - URI_ASSERT_INITIALIZATION(u);
    + ZEND_ASSERT(u->uri != NULL);

    @@
    uri_internal_t *u;
    expression e;
    @@

     u = &uri_object_from_obj(e)->internal
    ... when != u
    - URI_ASSERT_INITIALIZATION(u);
    + ZEND_ASSERT(u->uri != NULL);

* uri: Inline `parser` and `uri` into `uri_object_t`

After this, `uri_internal_t` will only be used when interacting with the URI
parsers without having a full-blown URI object.

Changes made with Coccinelle and some manual adjustments:

    @@
    identifier u;
    expression e;
    @@

    - uri_internal_t *u = &e->internal;
    + uri_object_t *u = e;

    @@
    uri_object_t *u;
    identifier t;
    @@

    - u->internal.t
    + u->t

* uri: Fix outdated `internal` naming for `uri_object_t`

* uri: Clean up naming of `uri_object_t` variables
The previous conditions were unreadable and incorrect. Extract the primary mode
first, then compare it to the allowed values.

Fixes GH-19810
Closes GH-19815
@pull pull bot locked and limited conversation to collaborators Sep 22, 2025
@pull pull bot added the ⤵️ pull label Sep 22, 2025
@pull pull bot merged commit 1aafd3e into turkdevops:master Sep 22, 2025
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants