Skip to content

Commit 5a7ae0c

Browse files
committed
ext/pdo: Move default_fetch_mode into PDO bitfield
This is now possible as we properly verify the fetch mode. This also saves 8 bytes on x64
1 parent 5327fa9 commit 5a7ae0c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/pdo/php_pdo_driver.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,12 @@ struct _pdo_dbh_t {
468468
/* bitmap for pdo_param_event(s) to skip in dispatch_param_event */
469469
unsigned skip_param_evt:7;
470470

471+
/* defaults for fetches */
472+
unsigned default_fetch_type:9;
473+
471474
/* the sum of the number of bits here and the bit fields preceding should
472475
* equal 32 */
473-
unsigned _reserved_flags:14;
476+
unsigned _reserved_flags:5;
474477

475478
/* data source string used to open this handle */
476479
const char *data_source;
@@ -503,9 +506,6 @@ struct _pdo_dbh_t {
503506
* when PDO::query() fails */
504507
pdo_stmt_t *query_stmt;
505508
zval query_stmt_zval;
506-
507-
/* defaults for fetches */
508-
enum pdo_fetch_type default_fetch_type;
509509
};
510510

511511
/* represents a connection to a database */

0 commit comments

Comments
 (0)