Re: [PATCH v6 3/3] bisect--helper: `write_terms` shell function in C

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

 



Hey Johannes,

On Mon, May 23, 2016 at 4:37 PM, Johannes Schindelin
<Johannes.Schindelin@xxxxxx> wrote:
> Hi Pranit,
>
> On Fri, 20 May 2016, Pranit Bauva wrote:
>
>> Frankly, I have no idea what you mean by libification but I will use
>> error() since efforts for libification have already started.
>
> The term "libification" is frequently used in the Git project: it means to
> convert code that was formerly used in a standalone program to make it
> usable as a library function.
>
> The main differences:
>
> - in the standalone program, you can get away with calling die() when
>   anything goes wrong. Not so in a library function: you need to give the
>   caller a chance to fail gracefully, or even to continue.
>
> - in a standalone program, you can be sloppy and "let exit() clean up",
>   i.e. omit free() calls or even close() calls. In library functions, this
>   is not possible.
>
> - in a standalone program, you may mess with the stdio handles. This is
>   an absolute no-go in library functions.
>
> There are other differences, of course. The gist is that you have to be a
> lot more careful for library functions.

Thanks for the explanation. It seems a bit clearer to me now.

Regards,
Pranit Bauva

>
> Ciao,
> Johannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]