DragonFly BSD
DragonFly submit List (threaded) for 2006-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Add strndup


From: "Dmitri Nikulin" <dnikulin@xxxxxxxxx>
Date: Wed, 21 Jun 2006 18:39:18 +1000

On 6/21/06, Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote:
    A memdup that is not string-oriented is a fine idea, but it
    would not be something we would add to libc unless there were
    a pre-existing reasonably standardized function somewhere that
    did that sort of operation.  It's only a few lines of code but
    the problem vis-a-vie putting things into libc is standardization.

    People are welcome to implement their own string handling functions,
    but we aren't going to put things into libc that are not standardized
    across multiple platforms.

In neither case (memdup nor my own kit) was I talking about inclusion into libc, which I consider completely useless because not everyone else will do it, so it'll have to be duplicated in 'portable' code bases anyway. I was merely saying that for Andreas' usage, he can easily find a better way, and I gave my example of a clean foundation for efficient and scalable memory referencing, which happens to work well for byte-per-char strings too.

-- Dmitri Nikulin



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]