Improve linking for internal headers #168
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request makes the following changes:
Most struct declarations were of the form
typedef struct name_s { /* data fields */ } name_t
, but some were typedef'd anonymously (withoutname_s
):typedef struct { /* data fields */ } name_t
. This made it impossible to forward declare them. I have added thename_s
part to all headers which omitted it.A seemingly random selection of the internal headers had the
extern "C"
required for linking with C++, but many did not have it; also, most of the internal headers containingextern "C"
used a style that differed from the style used in the public API headers, and some had extraneous semicolons which caused compiler warnings. I have added the directive to all internal headers and unified the style with that of the public API headers.ps_lattice_internal.h
requiredpocketsphinx_internal.h
but did not include it, so it would not work unlesspocketsphinx_internal.h
was included first. I have added the missing#include
directive.