Re: [Rd] protect/unprotect howto in C code

2006-05-17 Thread Thomas Lumley
On Wed, 17 May 2006, Michael Dondrup wrote: > Thank you very much, Thomas! > > Thanks to the explanation, I think I could almost track down that bug. May I, > just for clarification, ask a further bunch of questions (sorry). From what > you say, did I get it right: > > - 'error in unprotect: stac

Re: [Rd] protect/unprotect howto in C code

2006-05-17 Thread Michael Dondrup
Thank you very much, Thomas! Thanks to the explanation, I think I could almost track down that bug. May I, just for clarification, ask a further bunch of questions (sorry). From what you say, did I get it right: - 'error in unprotect: stack imbalance' is only a warning, it will not cause ter

Re: [Rd] protect/unprotect howto in C code

2006-05-17 Thread Thomas Lumley
On Wed, 17 May 2006, Michael Dondrup wrote: > Hi, > > Im currently trying to debug a 'error in unprotect: stack imbalance' problem > and I am curious about two basic questions on the use of PROTECT and > UNPROTECT, which I could not figure out: > > - which objects have to be protected, namely, if

[Rd] protect/unprotect howto in C code

2006-05-17 Thread Michael Dondrup
Hi, Im currently trying to debug a 'error in unprotect: stack imbalance' problem and I am curious about two basic questions on the use of PROTECT and UNPROTECT, which I could not figure out: - which objects have to be protected, namely, if the code is something like: SEXP fun, e; /* get the ex