OILS / cpp / embedded_file.h View on Github | oilshell.org

18 lines, 9 significant
1// Describes constant data generated by build/embedded_file_gen.py
2//
3// Note: this functionality could be part of mycpp/Tea
4
5#ifndef CPP_EMBEDDED_FILE_H
6#define CPP_EMBEDDED_FILE_H
7
8#include "mycpp/gc_str.h"
9
10struct TextFile {
11 const char* rel_path;
12 BigStr* contents; // GC string to avoid copying on return
13};
14
15// Linear search; last one has nullptr entries
16extern TextFile* gEmbeddedFiles;
17
18#endif // CPP_EMBEDDED_FILE_H