Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden API functions #78

Open
JayFoxRox opened this issue May 25, 2019 · 5 comments
Open

Hidden API functions #78

JayFoxRox opened this issue May 25, 2019 · 5 comments
Milestone

Comments

@JayFoxRox
Copy link
Contributor

There appear to be non-static functions which are prefixed with XbSymbolDatabase, but aren't actually listed as part of the XbSymbolDatabase.h:

unsigned int XbSymbolDataBaseVerifyEntry(SymbolDatabaseVerifyContext *context, const OOVPATable *table, uint32_t index)

unsigned int XbSymbolDataBaseVerifyDatabase(SymbolDatabaseVerifyContext *context, SymbolDatabaseList *data)

...


Are they unit tests / utils? Shouldn't they be in a separate file and only compiled on demand?

Should these be removed, prefix-removed, or listed in the header?

Affects #77 as we have to decide wether they have to remain non-static.

@RadWolfie
Copy link
Member

NOTICE: All export functions should start with XbSymbol. from #3

XbSymbolDataBase are only used internally.

@JayFoxRox
Copy link
Contributor Author

But XbSymbolDataBase starts with XbSymbol.. this is a very very poor design choice (that should be fixed).

@ergo720
Copy link
Member

ergo720 commented Jul 26, 2024

The APIs could use the prefix XbSBD (which is already being used here in libXbSymbolDatabase.h + it's shorter to type), and the internal functions could use the prefix XbSBDi, where the "i" would stand for "internal".

@RadWolfie RadWolfie added this to the 4.0 milestone Jul 26, 2024
@JayFoxRox
Copy link
Contributor Author

That still (potentially) has the same problem? The prefix shouldn't be able to overlap; why do internal functions need a prefix anyway?

@RadWolfie
Copy link
Member

Not really the same problem, but adding a letter i will separate the difference from a public prefix usage. It's common in Windows/Xbox development where they add i or p after the prefix of the type of library's intended purpose.
i.e. ObpObjectHandleTable is a private variable (yet somehow is exposed to kernel export?) vs ObOpenObjectByName is a public function. The difference is private variable has the letter p after Ob prefix.

Hopefully, the explanation will clarify the reasons we're doing this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants