[PATCH 2/2] ruby: fix missing symbol UINT2FIX()
Ali Polatel
polatel at gmail.com
Tue May 21 07:46:59 PDT 2013
2013/05/21 Tomi Ollila <tomi.ollila at iki.fi>:
>On Mon, May 20 2013, Felipe Contreras <felipe.contreras at gmail.com> wrote:
>
>> It has never existed in Ruby (maybe JRuby). Fortunately the symbols are
>> loaded lazily, so nobody would notice unless they try
>> 'query::count_messages'.
>>
>> Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>
>
>This patch could be pushed on it's own, but someone (like Ali) could
>comment on the change as searches on both UINT2FIX() & UINT2NUM()
>provides (IMH) insatisfactory results...
LGTM.
My bad, there's no such thing as UINT2FIX().
Yet, what's wrong with UINT2NUM()?
The description looks like:
"...take an unsigned int and convert it to a FIXNUM object if it will fit;
otherwise, convert to a Bignum object..."
Besides ruby-1.8 has it and that's the oldest version I was willing to
support. (If you have some free time, please confirm this because I may
not be remembering correctly.)
>Tomi
-alip
>
>> ---
>> bindings/ruby/query.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/bindings/ruby/query.c b/bindings/ruby/query.c
>> index e5ba1b7..1658ede 100644
>> --- a/bindings/ruby/query.c
>> +++ b/bindings/ruby/query.c
>> @@ -180,5 +180,5 @@ notmuch_rb_query_count_messages (VALUE self)
>> * (function may return 0 after printing a message)
>> * Thus there is nothing we can do here...
>> */
>> - return UINT2FIX(notmuch_query_count_messages(query));
>> + return UINT2NUM(notmuch_query_count_messages(query));
>> }
>> --
>> 1.8.3.rc3.286.g3d43083
>>
>> _______________________________________________
>> notmuch mailing list
>> notmuch at notmuchmail.org
>> http://notmuchmail.org/mailman/listinfo/notmuch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20130521/4fe2e412/attachment.pgp>
More information about the notmuch
mailing list