Fwd: Re: patch for kurlcompletion.cpp
Michael Pyne
pynm0001 at comcast.net
Mon Oct 25 04:21:15 BST 2004
On Sunday 24 October 2004 09:22 am, Stefan Teleman wrote:
> Dudes :-)
>
> There is a reason why FD_ZERO is implemented with
> bzero: bzero is not deprecated. :-)
No one said it was deprecated, people have said it's not *portable*. And it's
not, memset() is implemented in many more C libraries than bzero(). For
example, I don't think Windows supports bzero(). Who cares about Windows?
Well, the kdelibs-win32 project for one thing.
I guess it would be a different story if having to support Windows would
simply make something impossible, but this isn't the case here.
> And the reason i personally (emphasis on personally) use the b*
> instead of the mem* ones is: vendors usually implement the b*
> functions in hardware (this is the case for SPARC, HPPA/RISC or
> PowerPC). And then, unbeknownst to everyone, the mem* functions are
> usually implemented in terms of the b* functions, because noone wants
> to copy memory byte by byte.
If that's the case, mem*() is implemented in hardware as well. Saving a
function call and a few instructions to call a function directly doesn't
really achieve much in this case.
> So, it's most likely that you're using bzero and bcopy anyway, nicely
> wrapped in memcpy and memset. :-P
>
> But i have no problem using the mem* ones if this is what you prefer.
Thanks! :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041024/70dc0b99/attachment.sig>
More information about the kde-core-devel
mailing list