From: Yusuke Endoh Date: 2012-02-25T09:19:42+09:00 Subject: [ruby-core:42876] Re: [ruby-trunk - Feature #6065] Allow Bignum marshalling/unmarshalling from C API Hello, 2012/2/25 Martin Bosslet : > Kenta Murata wrote: >> I also believe it is useful that the feature to dump a Bignum to C array. > >> I made a patch for realizing the feature. >> Please check this gist https://gist.github.com/1892968 Objection. You missed Martin's point. Martin proposes "portable" mechanism of bignum import/export. For your use case, you can just use RBIGNUM_DIGITS instead of rb_big_dump_to_cary. I agree with akr; Martin's proposal depends on the type long, which is not "portable" enough. For designing the APIs, I think we should refer gmplib, which is a giant in this area. http://gmplib.org/manual/Integer-Import-and-Export.html -- Yusuke Endoh