Hi,
2009-11-30 21:31 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
+ harbour/contrib/hbcairo
I'll write down a few issues I found in hbcairo development.
1) #include "std.ch" generates compile time errors.
2) I'm a little confused how to implement GC pointers. So, I've
implemented two version in hbcairo/core.c. It can be selected [not]using
HB_USE_ITEM define. In current code the switch is not defined and more
"low level" version is used (actually, I even forgot to test using
HB_USE_ITEM). Are these GC pointer implementations correct? A few
subquestions are:
2a) hb_gcRefInc()/hb_gcRefDec() is required without HB_USE_ITEM. This
requires define _HB_API_INTERNAL_. Is this OK?
2b) In function CAIRO_PATH_ITERATOR_CREATE() new item is created using:
pIterator->pPath = hb_itemNew( hb_param( 1, HB_IT_POINTER ) );
2c) Does pIterator->pPath need to be unlocked in case 2b? I will mark it!
2d) If it remains locked, then hb_gcGripMark( pIterator->pPath ) in mark
function is not necessary?
2e) Can I be sure that inside CAIRO_PATH_ITERATOR_NEXT() pPath is a
valid (not destroyed path)? (both with and without HB_USE_ITEM)
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 ) );
4) Should implementation of procedures end with hb_ret(); ?
Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour