Re: [q-lang-users] Memory management in libqint
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2006-06-12 22:36:41
|
John Cowan wrote: > Not only that, but Chicken itself is now available as an egg (if you > have a Chicken loaded, you can upgrade to a later version by installing > the egg). Which leads to a curious philosophical question.... ... which was already answered two weeks ago on Slashdot. :) > Which will involve poking about in the GMP docs to figure out how to > copy an mpz_t, since Chicken's FFI doesn't provide any help as it does > with strings. mpz_t x; mpz_init(x); mpz_set(x, y); // y is the mpz_t to be copied > Unfortunately, the FFI is not aware of whether bignums are available > or not. Hmm, that's bad. But maybe there's a Lisp function which does this check? I guess that Chicken's FFI lets you eval sexps? > PROBLEM: there doesn't seem to be a way to convert a qexpr to a symbol > number, the opposite of mksym. I had assumed that issym does this, but > the second argument is of type int, not int*, so it only tests if the > qexpr is some specific, already-known symbol. This is good for qistrue > etc., but not for me. I need to be able to find out which symbol it is > so that I can return a corresponding Chicken symbol. That's right, I just put it on the TODO list for Q 7.2. -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |