In all cases I've checked where HB_ISNIL() is used, it is going to read a POINTER from the parameter, so AFAICS all you have to do is to reverse the iif() results and replace HB_ISNIL() with HB_ISPOINTER() (in the generator).
Or, if it can be other than POINTER, you'll have to add new CASE branches in the generator. HB_ISNIL() is only needed if you specifically want to check if a NIL has been passed, it's never useful where you expect any known types which you'll try to read in the next step with one typed hb_par*() call. Brgds, Viktor On Mon, Jun 8, 2009 at 6:28 AM, Pritpal Bedi<[email protected]> wrote: > > Hello Viktor > > > Viktor Szakáts wrote: >> >> You've readded ISNIL() check in the code. I've removed them >> all recently because the concept is wrong (see my comments >> in ChangeLog). I suggest to change it to HB_IS<type>() because >> this is the only safe solution in this case. >> > > Are you talking about ( hbqtgen.prg ): > > CASE aA[ PRT_L_AND ] .and. aA[ PRT_L_CONST ] > s := '*hbqt_par_' + aA[ PRT_CAST ] + '( ' + cHBIdx + ' )' > IF !empty( aA[ PRT_DEFAULT ] ) .and. ( '(' $ aA[ PRT_DEFAULT > ] ) > aA[ PRT_BODY ] := '( HB_ISNIL( '+cHBIdx+' ) ? ' + aA[ > PRT_DEFAULT ] +' : '+ s +' )' > ELSE > aA[ PRT_BODY ] := s > ENDIF > > Then it has to stay there as is because at this point of execution > it is unknown type and I have no means to detect it beforehand, > so HB_ISNIL() is the only checking mechanism. > > Let me know if we have other options. > > Regards > Pritpal Bedi > -- > View this message in context: > http://www.nabble.com/SF.net-SVN%3A-harbour-project%3A-11263--trunk-harbour-tp23916437p23918074.html > Sent from the Harbour - Dev mailing list archive at Nabble.com. > > _______________________________________________ > Harbour mailing list > [email protected] > http://lists.harbour-project.org/mailman/listinfo/harbour > _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
