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

Private configuration variables and files exposed in public headers #27

Open
franko opened this issue Jan 3, 2023 · 2 comments
Open

Comments

@franko
Copy link

franko commented Jan 3, 2023

I have a concern about the header files that are exported publicly because they depends on some variables like:

  • HAVE_CONFIG_H
  • HAVE_STDINT_H

but these variables should be private to the library and the file config.h file should be private as well and not meant to be exported.

See for example the file "numbers.h".

In addition the usage of config.h and of the defines is essentially useless because the declarations in the header files are not actually adapted to the values each variable has.

In my understanding all the reference to these private variables should disappear from the exported header files and the config.h should not be included.

franko added a commit to franko/libtexpdf that referenced this issue Jan 3, 2023
Normally the test program should not use the private config variables of
the library but we are temporarily adding them to make the tests succed.

The problem was reported in the github issue:

sile-typesetter#27
@alerque
Copy link
Member

alerque commented Jan 4, 2023

Is this an artifact of the code originally being extracted from a larger upstream project where those might have been defined/used or just something that was never setup properly in the first place? One of the things that needs to be considered when fixing things like this is how we're going to keep this code in sync or at least refreshed occasionally with the upstream it was extracted/forked from.

@franko
Copy link
Author

franko commented Jan 4, 2023

Ok I understand, I may have a look to the upstream project but what is it ?

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

2 participants