[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GMP compiled under MacOS/C++ wrap

From: Kevin Ryde
Subject: Re: GMP compiled under MacOS/C++ wrap
Date: 26 Apr 2001 08:20:25 +1000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5

Hans Aberg <address@hidden> writes:
> The Makefile does not help at all under pre-MacOS X; it is completely
> useless. Under MacOS X (which I do not have), GCC is available, and I
> figure it would compile straight off with GCC.

I mean the macos/configure and macos/Makefile.in etc.  (Bug reports
direct to Kent about that, see macos/README.)

> In addition, I am now making a Flex/Bison parser, making it easy to test
> the different arithmetic operations (calculator style).

Have a look at demos/calc.y and calclex.l if you haven't already.
Very minimal, but better than a poke in the eye with a burnt stick.

> It is not possible (by empirical experience) under C++ to return a
> reference from a function and combine it with a proper memory management
> (for example, exceptions will screw it up).

Really?  Oh well.

> Again, I think that this might be slow. So therefore I want the
> __mpz_struct have all its data in the pointer, plus reserved space for the
> count.

Perhaps it'd work to tack an extra field on the end.  Then p->z is
simply a type-safe cast.

        struct mpz_with_refcnt {
          mpz_t  z;
          int    refcnt;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]