On 02/23/13 10:45, Dmitry Yemanov wrote:
> Adriano,
>
> Log Message:
> -----------
> Change message buffers type to void*. It adds some casts, but avoid them
> in users' code.
> -----------
>
> I disagree with this change. If we want to save users some casts, let's
> change the public API but keep UCHAR* in lower levels, thus having extra
> casts only in the Y-valve. I see no point in changing e.g. DSQL code in
> favor of users, they're completely unrelated.
>

I agree with Dmitry that internals of code should be reverted back. But 
also I'm not absolutely sure that even in API buffers should be void*. 
Yes, in theory void* is definitely correct, but on practice very typical 
operation on that buffer is adding offset to the beginning of the 
buffer, and after this change one has to cast it first to UCHAR* (see 
auth/SecureRemotePassword/Message.h). I.e. even at client side we need 
more casts.

I can imagine only one case when void* is definitely better than UCHAR* 
- that's when something like gpre generates host language structures 
(well knowing what SQL operator returns/needs) and passes them to API 
calls. If we think this is typical use of API, let's have buffers in 
interfaces void*. In other case whole change seems to be useless.



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to