Compare commits

...

2 Commits

Author SHA1 Message Date
Georgi Gerganov
df65154415
contrib : filename guidelines [no ci] 2025-01-12 19:12:18 +02:00
Georgi Gerganov
d974cae286
contrib : clarify _context suffix usage [no ci] 2025-01-12 17:37:36 +02:00

View File

@ -84,7 +84,7 @@
- The `get` `<action>` can be omitted
- The `<noun>` can be omitted if not necessary
- The `_context` suffix of the `<class>` is optional
- The `_context` suffix of the `<class>` is optional. Use it to disambiguate symbols when needed.
- Use `init`/`free` for constructor/destructor `<action>`
- Use the `_t` suffix when a type is supposed to be opaque to the user - it's not relevant to them if it is a struct or anything else
@ -98,6 +98,9 @@
> [!NOTE]
> This guideline is yet to be applied to the `llama.cpp` codebase. New code should follow this guideline.
- C/C++ filenames are all lowercase with dashes. Headers use the `.h` extension. Source files use the `.c` or `.cpp` extension
- Python filenames are all lowercase with underscores
- (TODO: abbreviations usage)
# Preprocessor directives