Re: [PATCH 1/6] strbuf.h: move declarations for strbuf.c functions from git-compat-util.h

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

 



Calvin Wan <calvinwan@xxxxxxxxxx> writes:

> While functions like starts_with() probably should not belong in the
> boundaries of the strbuf library, this commit focuses on first splitting
> out headers from git-compat-util.h.

Yeah, compat-util.h started out as a (surprise) "compatibility aid"
that isolates the knowledge of platform specific inclusion order,
what feature macros to define before including which system header
file, etc. but over the years, it accumulated some common niceties
that are too small to deserve their own header files.

starts_with() and skip_prefix() are two examples of such.  

It is hard to imagine skip_to_optional_arg_default() should belong
to strbuf API, but if you are booting it out of compat-util,
declaring it in strbuf.h may be the least bad choice, as the
implementation sits in strbuf.c (which is a strange place, but that
is not the fault of this series).



[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]

  Powered by Linux