Skip to content

Commit a4f5984

Browse files
committed
main: introduce a function make a tag a placeholder
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent d76ae2d commit a4f5984

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main/entry.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,12 +1652,17 @@ extern size_t countEntryInCorkQueue (void)
16521652
return ptrArrayCount (TagFile.corkQueue);
16531653
}
16541654

1655+
extern void markTagPlaceholder (tagEntryInfo *e, bool placeholder)
1656+
{
1657+
e->placeholder = placeholder;
1658+
}
1659+
16551660
extern int makePlaceholder (const char *const name)
16561661
{
16571662
tagEntryInfo e;
16581663

16591664
initTagEntry (&e, name, KIND_GHOST_INDEX);
1660-
e.placeholder = 1;
1665+
markTagPlaceholder(&e, true);
16611666

16621667
/*
16631668
* makePlaceholder may be called even before reading any bytes

main/entry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ extern void attachParserFieldToCorkEntry (int index, fieldType ftype, const char
261261
extern const char* getParserFieldValueForType (tagEntryInfo *const tag, fieldType ftype);
262262

263263
extern int makePlaceholder (const char *const name);
264+
extern void markTagPlaceholder (tagEntryInfo *e, bool placeholder);
264265

265266
/* Marking all tag entries entries under the scope specified
266267
* with index recursively.

0 commit comments

Comments
 (0)