@@ -392,22 +392,22 @@ static int pdo_sqlite_stmt_get_attribute(pdo_stmt_t *stmt, zend_long attr, zval
392392 ZVAL_TRUE (val );
393393 }
394394 break ;
395- case PDO_SQLITE_ATTR_EXPLAIN_STATEMENT :
395+ case PDO_SQLITE_ATTR_EXPLAIN_STATEMENT :
396396#if SQLITE_VERSION_NUMBER >= 3041000
397397#if defined(__APPLE__ )
398- if (__builtin_available (macOS 14.2 , * )) {
398+ if (__builtin_available (macOS 14.2 , * )) {
399399#endif
400- ZVAL_LONG (val , (zend_long )sqlite3_stmt_isexplain (S -> stmt ));
401- return 1 ;
400+ ZVAL_LONG (val , (zend_long )sqlite3_stmt_isexplain (S -> stmt ));
401+ return 1 ;
402402#if defined(__APPLE__ )
403- } else {
404- zend_value_error ("explain statement unsupported" );
405- return 0 ;
406- }
403+ } else {
404+ zend_value_error ("explain statement unsupported" );
405+ return 0 ;
406+ }
407407#endif
408408#else
409- zend_value_error ("explain statement unsupported" );
410- return 0 ;
409+ zend_value_error ("explain statement unsupported" );
410+ return 0 ;
411411#endif
412412 default :
413413 return 0 ;
@@ -419,41 +419,41 @@ static int pdo_sqlite_stmt_get_attribute(pdo_stmt_t *stmt, zend_long attr, zval
419419static int pdo_sqlite_stmt_set_attribute (pdo_stmt_t * stmt , zend_long attr , zval * zval )
420420{
421421 switch (attr ) {
422- case PDO_SQLITE_ATTR_EXPLAIN_STATEMENT :
422+ case PDO_SQLITE_ATTR_EXPLAIN_STATEMENT :
423423#if SQLITE_VERSION_NUMBER >= 3041000
424424#if defined(__APPLE__ )
425- if (__builtin_available (macOS 14.2 , * )) {
425+ if (__builtin_available (macOS 14.2 , * )) {
426426#endif
427- if (Z_TYPE_P (zval ) != IS_LONG ) {
428- zend_type_error ("explain mode must be of type int, %s given" , zend_zval_value_name (zval ));
429- return 0 ;
430- }
431- if (Z_LVAL_P (zval ) < 0 || Z_LVAL_P (zval ) > 2 ) {
432- zend_value_error ("explain mode must be one of the Pdo\\Sqlite::EXPLAIN_MODE_* constants" );
433- return 0 ;
434- }
435-
436- pdo_sqlite_stmt * S = (pdo_sqlite_stmt * )stmt -> driver_data ;
437- if (sqlite3_stmt_explain (S -> stmt , (int )Z_LVAL_P (zval )) != SQLITE_OK ) {
438- return 0 ;
439- }
440-
441- return 1 ;
427+ if (Z_TYPE_P (zval ) != IS_LONG ) {
428+ zend_type_error ("explain mode must be of type int, %s given" , zend_zval_value_name (zval ));
429+ return 0 ;
430+ }
431+ if (Z_LVAL_P (zval ) < 0 || Z_LVAL_P (zval ) > 2 ) {
432+ zend_value_error ("explain mode must be one of the Pdo\\Sqlite::EXPLAIN_MODE_* constants" );
433+ return 0 ;
434+ }
435+
436+ pdo_sqlite_stmt * S = (pdo_sqlite_stmt * )stmt -> driver_data ;
437+ if (sqlite3_stmt_explain (S -> stmt , (int )Z_LVAL_P (zval )) != SQLITE_OK ) {
438+ return 0 ;
439+ }
440+
441+ return 1 ;
442442#if defined(__APPLE__ )
443- } else {
444- zend_value_error ("explain statement unsupported" );
445- return 0 ;
446- }
443+ } else {
444+ zend_value_error ("explain statement unsupported" );
445+ return 0 ;
446+ }
447447#endif
448448#else
449- zend_value_error ("explain statement unsupported" );
450- return 0 ;
449+ zend_value_error ("explain statement unsupported" );
450+ return 0 ;
451451#endif
452452 default :
453453 return 0 ;
454- }
454+ }
455455
456- return 1 ;
456+ return 1 ;
457457}
458458
459459const struct pdo_stmt_methods sqlite_stmt_methods = {
0 commit comments