On Tue, 12 Jan 2010, Szak�ts Viktor wrote: Hi,
> I have a question about hb_vmRequestReenter(). > What is the rule to call it? It checks if HVM is active and ready to execute PRG code, safe and restore RETURN value so it's not overwritten by executed code and safe and restore HVM exception signals so it's possible to execute PRG code even if QUIT or BREAK exception is set. When it restores exceptions then if necessary it merges saved exception and the exception set by executed code. This are operations executed for current HVM but it may change in the future. In general it tries to adopt HVM for reentrant call. > If it must be called before hb_vmProc()/hb_vmSend()/hb_vmEval*()/?, It depends on context. If you want to respect above conditions then yes. In most of cases the answer is yes. > shouldn't we add it to hb_evalLaunch() function to stay > compatible with old code, where this requirement wasn't present yet? We do not use hb_evalLaunch() in core code so I cannot say how it's used by 3-rd party code. It does not return pointer to hb_stackReturnItem() so it's possible to encapsulate it and probably it will not cause any problems for 3-rd party code. It may interact only with code which expects that copy of returned value is in hb_stackReturnItem(). It also effects code which was interrupted by existing exceptions but in Clipper the exception are check very unregulary so I do not believe that anyone created code which strongly depends on such behavior. In my opinion we can add it. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
