Hi,
I have a proposal.
Let's say I have function print_utf8() which accepts const char *
parameter in utf8 encoding, and I want to do Harbour wrapper function
for this C function.
1) current code
HB_FUNC( PRINT )
{
const char * str;
void * h;
h = hb_parstr_utf8( 1, &str, NULL );
hb_retnl( printf_utf8( str ) );
hb_strfree( h );
}
2) if we change hb_parstr_ut8() to return string, and handler to be
returned via parameter reference.
HB_FUNC( PRINT )
{
void * h;
hb_retnl( printf_utf8( hb_parstr_utf8( 1, &h, NULL ) ) );
hb_strfree( h );
}
The same proposal for hb_itemGetStr*().
Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour