3)What is correct way to code:
pCairo = hb_cairo_par( 1 ); // generate RTE if parameter is wrong
if( pData )
cairo_something( pCairo );
or this is also ok?:
cairo_something( hb_cairo_par( 1 ) );
The first one is right. You should always
check for at least NULL, as users may just
pass other types, or non-cairo handles to
the functions.
Yes, user may pass any parameter, but hb_cairo_par() checks if it is
valid parameter and generates runtime error. Does hb_errRT_BASE()
returns? Or it uses some C stack functions (like setjump) to exit to the
nearest BEGIN SEQ/END SEQ.
Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour