git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] compat: move strdup(3) replacement to its own file
Date: Tue, 6 Sep 2016 17:40:49 +0200	[thread overview]
Message-ID: <6926b39c-4448-c463-33f7-d9eae841c635@web.de> (raw)
In-Reply-To: <alpine.DEB.2.20.1609040941210.129229@virtualbox>

Am 04.09.2016 um 09:46 schrieb Johannes Schindelin:
> Hi René,
>
> I imagine you Cc:ed me because the nedmalloc stuff came in via the Windows
> port, contributed by Marius (who is no longer active on the Git project
> because it works well enough for him)?

Kind of; it's also a follow-up to the recent discussion you started 
about compiler warnings in that code.

> On Sat, 3 Sep 2016, René Scharfe wrote:
>
>> Move our implementation of strdup(3) out of compat/nedmalloc/ and allow
>> it to be used independently from USE_NED_ALLOCATOR.  This reduces the
>> difference of our copy of nedmalloc from the original, making it easier
>> to update, and allows for easier testing and reusing of our version of
>> strdup().
>
> I would like to suggest an additional paragraph to explain why we do not
> need to #include "git-compat-util.h" in nedmalloc from now on:
>
> 	Please note that nedmalloc never actually uses strdup() itself,
> 	therefore we need not enforce gitstrdup() usage in nedmalloc.c.

Well, OK.  I think the missing point is that the original nedmalloc 
doesn't come with strdup() and doesn't need it.  Only _users_ of 
nedmalloc need it.  Marius added it in nedmalloc.c, but strdup.c is a 
better place for it.

René

  reply	other threads:[~2016-09-06 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03 15:59 [PATCH] compat: move strdup(3) replacement to its own file René Scharfe
2016-09-04  7:46 ` Johannes Schindelin
2016-09-06 15:40   ` René Scharfe [this message]
2016-09-07 17:44     ` Junio C Hamano
2016-09-08  6:59       ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6926b39c-4448-c463-33f7-d9eae841c635@web.de \
    --to=l.s.r@web.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).