On 09/05/2010 09:37 PM, Markus Hoenicka wrote: > Hi, > > I'm about to finalize new libdbi and libdbi-drivers releases now that > all issues with the new libdbi-drivers test kit seem to be fixed. As a > result of recent discussions about using libdbi in multithreaded > applications, I've decided to rename the functions of our new > instance-based interface. I've realized that our original choice of > xyz_r superseding the old xyz functions was ill-advised as the _r > suffix is commonly used for reentrant implementations of non-reentrant > functions. I'd like to avoid any confusion in this matter, therefore > I've renamed these functions to xyz_i. The _i reminds the user that > this version of the function requires an instance handle. The > following functions are affected by this change: >
That's basically how the _r suffix works. Take a look at rand() and rand_r(). If the function does something requiring state the thread safe version of it will require that state to be passed as a variable, exactly like the instance pointer used for libdbi. The _i suffix would easily be mistaken for a function returning a signed integer, using a mix of multiple-word and reverse hungarian notation. I recommend against it. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ libdbi-devel mailing list libdbi-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-devel