Skip to content

Commit 5a3ec97

Browse files
committed
Comment the target Ruby variants
1 parent 81fb72b commit 5a3ec97

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/mysql2/statement.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,14 @@ static int my_big2ll(VALUE bignum, LONG_LONG *ptr)
231231
nlz_bits == 0 &&
232232
#endif
233233
#if defined(HAVE_RB_ABSINT_SIZE) && defined(HAVE_RB_ABSINT_SINGLEBIT_P)
234-
/* only -0x8000000000000000 is safe if `len == 8 && nlz_bits == 0` */
234+
/* Optimized to avoid object allocation for Ruby 2.1+
235+
* only -0x8000000000000000 is safe if `len == 8 && nlz_bits == 0`
236+
*/
235237
!rb_absint_singlebit_p(bignum)
236238
#elif defined(HAVE_RB_BIG_CMP)
237239
rb_big_cmp(bignum, LL2NUM(LLONG_MIN)) == INT2FIX(-1)
238240
#else
241+
/* Ruby 1.8.7 doesn't have rb_big_cmp */
239242
rb_funcall(bignum, intern_cmp, 1, LL2NUM(LLONG_MIN)) == INT2FIX(-1)
240243
#endif
241244
) {

0 commit comments

Comments
 (0)