[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passing arg of `merge_face_heights' makes integer from pointer witho
Re: passing arg of `merge_face_heights' makes integer from pointer without a cast
Fri, 05 Nov 2004 10:01:47 -0500
> That structure looks like something for which cons cells would work,
> so why not use cons cells?
Because these structures are allocated on the stack -- they are very
and used extremely often.
If they are allocated in the stack, then it should be easy to
explicitly gcpro the Lisp_Object in each one. Just do that in the
frame that allocates the struct. Doesn't that do the job this
gcpro argument was intended to do?
Here's another idea.
How deep does this stack often get? Maybe just allocate a single
vector and use it as a stack. If it ever isn't big enough, replace it
with a vector twice as big. You can null out the whole vector at the
end of face merging.
Since this would be an ordinary Lisp vector, GC would handle it just
fine, it just needs a staticpro.