-
Notifications
You must be signed in to change notification settings - Fork 611
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
Move libultra functions and variables to libultra headers #1468
Open
Thar0
wants to merge
6
commits into
zeldaret:main
Choose a base branch
from
Thar0:libultra-headers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,433
−1,044
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
16328f5
Move libultra functions and variables to headers, libultra files no l…
Thar0 32e2123
Merge branch 'master' of https://github.com/zeldaret/oot into libultr…
Thar0 740a89c
Remove extern on some function prototypes
Thar0 e545de1
More libc header changes
Thar0 d96b6df
assert.h, is_debug.h, printing function fixes, more libc fixes
Thar0 bb0af75
Fix bss reordering
Thar0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef ATTRIBUTES_H | ||
#define ATTRIBUTES_H | ||
|
||
#if !defined(__GNUC__) && !defined(__attribute__) | ||
#define __attribute__(x) | ||
#endif | ||
|
||
#define UNUSED __attribute__((unused)) | ||
#define FALLTHROUGH __attribute__((fallthrough)) | ||
#define NORETURN __attribute__((noreturn)) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef ISVIEWER_H | ||
#define ISVIEWER_H | ||
|
||
#include "ultra64.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this include be in the .c only? It's not needed by the .h, I think |
||
#include "attributes.h" | ||
|
||
void isPrintfInit(void); | ||
|
||
void isPrintf(const char* fmt, ...); | ||
NORETURN void isAssertFail(const char* exp, const char* file, int line); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef ALLOCA_H | ||
#define ALLOCA_H | ||
|
||
#include "stddef.h" | ||
|
||
void* alloca(size_t); | ||
#define alloca __builtin_alloca | ||
|
||
#endif |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say I'm a fan of the include path not being the same throughout the repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just more correct than using
ultra64/...
paths in libultra files, and libultra files ideally shouldn't see any headers from the base include dir (although unfortunately as I mentioned I still couldn't get rid of two headers yet)It may be better if we moved
src/libultra
to saylib/libultra
with it's own makefile or something, but that's a bit too far of a departure from what I wanted to achieve for now (but I think doing this later may be good)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I understand the appeal when looking at libultra specifically/separately and I agree libultra should be completely cut off from the rest, my beef is mostly/only that it's confusing when navigating the repo
It would be nice to document this somewhere other than "self-documenting" in the Makefile. I wouldn't be opposed to a
README
file in src/libultra and include/libultra but idk if that would be a popular suggestionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I'm starting with criticism but I should also congratulate you on a job well done, it's nice to see header cleanup and this looks quite involved