[mercury-users] announced: libtiff foreign interface (caveats)

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Wed Feb 7 13:09:43 AEDT 2007


Dear all, Peter wrote:

>The mutex only protects a single foreign_proc at a time.  It doesn't
>prevent two instances of read_to_matrix or write_as_tiff from executing
>at the same time, for example.  You'd need to get rid of the two globals
>in libtiff_io.c and pass them around as parameters.

*sigh!* And that was exactly why I wrote the warning as I did!  Change #2
on its way.  Good catch, Peter!

Two questions: does this change make the library thread safe? and,
an unrelated question, I get the following warnings:

...
tiffany.m: In function 'mercury__tiffany__write_as_tiff_2_0_i3':
tiffany.m:160: warning: passing argument 1 of 'save_to_rgba_tiff_file_and_close' makes pointer from integer without a cast
[etc]
...

The cast it complains about is converting a c_pointer type to an external C pointer
type!  Can this warning be eliminated? or am I writing code wrongly?  If so, how
should I write the code so it doesn't generate these warnings?

Sincerely,
Doug Auclair

--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list