Skip to content

Commit 0bfde7d

Browse files
committed
Use correct type and format for ReadPreference ctor mode
1 parent 53e7677 commit 0bfde7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MongoDB/ReadPreference.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PHP_METHOD(ReadPreference, __construct)
5252
{
5353
php_phongo_readpreference_t *intern;
5454
zend_error_handling error_handling;
55-
long mode;
55+
phongo_long mode;
5656
zval *tagSets = NULL;
5757
SUPPRESS_UNUSED_WARNING(return_value_ptr) SUPPRESS_UNUSED_WARNING(return_value) SUPPRESS_UNUSED_WARNING(return_value_used)
5858

@@ -88,7 +88,7 @@ PHP_METHOD(ReadPreference, __construct)
8888
}
8989
break;
9090
default:
91-
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Invalid mode: %ld", mode);
91+
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Invalid mode: %" PHONGO_LONG_FORMAT, mode);
9292
return;
9393
}
9494
}

0 commit comments

Comments
 (0)