Thread (1 message) 1 message, 1 author, 2017-12-21

Re: [PATCH 2/6] fsmonitor: Add dir.h include, for untracked_cache_invalidate_path

From: Junio C Hamano <hidden>
Date: 2017-12-21 21:47:33

Alex Vandiver [off-list ref] writes:
quoted
But I am not sure if this is a right direction to go in.  If a .C
user of fsmonitor needs (does not need) things from dir.h, that file
can (does not need to) include dir.h itself.
Hm; I was patterning based on existing .h files, which don't seem shy
about pulling in other .h files.
IIUC, existing X.h do pull in Y.h when X.h uses a structure or a
typedef defined in Y.h (but using pointer to such a structure or a
type does not count) defined in Y.h; in such a case, a user of X.h
that wants to use what is defined in X.h would not be able to use
it without somehow knowing the shape of such a structure or type and
would be forced to pull in Y.h itself.  "static inline" falls into
the same category---as it stands, anybody that includes fsmonitor.h
and wants to use one of these static inline functions would need to
have definitions from dir.h, which I agree is wrong and I understand
that you want to include dir.h there.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help