Hi Christoph,

On 28/08/2020 22:57, Christoph M. Becker wrote:
> Can we be certain that the relevant bits of the formerly _reserved_flags
> are zero-filled for all existing drivers?

We can, that's basically the premise of the PR itself:

 1. The flags are in the pdo_dbh_t struct which is the dbh->inner part
 2. dbh->inner = ecalloc(1, sizeof(pdo_dbh_t)):
 3. stmt->dbh is set as dbh->inner, in prepare and query
 4. drivers can eventually set some bits to 1.

A few quick links:

https://github.com/php/php-src/blob/658f6ff2dae42c4f2b5c6f8d6adc8c8f09b52b47/ext/pdo/php_pdo_driver.h#L514
https://github.com/php/php-src/blob/658f6ff2dae42c4f2b5c6f8d6adc8c8f09b52b47/ext/pdo/pdo_dbh.c#L562
https://github.com/php/php-src/blob/658f6ff2dae42c4f2b5c6f8d6adc8c8f09b52b47/ext/pdo/pdo_dbh.c#L1085
https://github.com/php/php-src/blob/658f6ff2dae42c4f2b5c6f8d6adc8c8f09b52b47/ext/pdo/pdo_dbh.c#L1481


Cheers
-- 
Matteo Beccati

Development & Consulting - http://www.beccati.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to