[Top][All Lists]

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

Re: [Chicken-users] eval from string with long strings.

From: felix winkelmann
Subject: Re: [Chicken-users] eval from string with long strings.
Date: Thu, 4 Sep 2008 07:46:25 +0200

On Wed, Sep 3, 2008 at 4:50 PM, Heinrich Taube <address@hidden> wrote:
> hi my c++ app statically links to libchicken 3.0.0 and i start a chicken
> session like this:
>  HeapSize: 1000000
>  StackSize: 64000
> now, if i send chicken a long string to eval i get the error
> Error: not enough room for result string
> and my app crashes, which is really bad since editing windows with unsaved
> work and everthing else dies.
> is there a way to tell chicken to allocate more room without such a hard
> constraint? the string in sending to chicken (via eval_from_string) contains
> an expression "(define foo '(....))"  where .... is longish (35000 chars)
> but lisp should be able to deal with this i think.

Do you mean CHICKEN_eval_to_string() ? You should be able to pass
a buffer-size that wll hold the result string. What arguments are you
giving to the function?

> whats strange is that if i start CSI in the terminal and simply paste the
> expr into csi it handles it.

That doesn't go through CHICKEN_eval_to_string. The result is
converted to a C string and we have to supply the maximal buffer
size. In the interpreter the result is written to the console, and
thus isn't limited to a particular length.


reply via email to

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