[S21.5] Add bignums to FAQ

Stephen J. Turnbull stephen at xemacs.org
Wed Apr 7 10:16:48 EDT 2004


>>>>> "Hrvoje" == Hrvoje Niksic <hniksic at xemacs.org> writes:

    Hrvoje> "Stephen J. Turnbull" <stephen at xemacs.org> writes:

    >> You should just treat a bignum as a blob of memory with an
    >> lrecord_header attached, or whatever, ie, an "opaque".

    Hrvoje> As long as we *know* that they don't contain pointers to
    Hrvoje> heap-allocated data, this is fine.  Do we know that?

Hmm ... apt-get update libgmp3-doc and ... oops, they are indirect,
containing pointers to separately allocated memory, rather than being
an immediate representation.  So we'll have to treat them like strings
rather than opaques, and I don't offhand see how to stuff the
information back in them, but probably we just need to update the
pointers properly.

I know that Python at least and probably Perl have MP modules.  I bet
Python bignums have a pickle method, and if so they've already solved
this problem.  The usual licenses in those communities are upwardly
compatible with GPL, so we could probably even steal code.

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.




More information about the XEmacs-Beta mailing list