-
Notifications
You must be signed in to change notification settings - Fork 77
Add #pragma once #463
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
base: dev
Are you sure you want to change the base?
Add #pragma once #463
Conversation
Seems like AppVeyor build failed for some reason, it works well on my machine (Win10, VS 2017) |
source/compiler/sc2.c
Outdated
basefname=_cchar+1; | ||
/* assign '_inc_includename' string to symname */ | ||
strcpy(symname,"_inc_"); | ||
strlcat(symname,basefname,sizeof symname); |
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.
How closely does this replicate all the behaviour here: https://github.com/pawn-lang/compiler/wiki/File-Inclusion
@Y-Less it only adds |
Now what it does is:with these lines of code: #include <a_samp>
#include <ColAndreas>
#include <ColAndreas>
#include <float>
#include <ColAndreas>
#include <float>
#include "../../ColAndreas" that I added
There's also one more thing to mention, |
This issue has been automatically marked as stale because it has not had recent activity. |
I think it's better if the include guard symbol does not contain the separators. We need some abstract OS independent symbol name. I think it would be even better to avoid using symbols altogether and use global list of includes. |
This issue has been automatically marked as stale because it has not had recent activity. |
How did this PR end? |
This issue has been automatically marked as stale because it has not had recent activity. |
What this PR does / why we need it:
#pragma once
, like old compiler, now you can use#pragma once
to include the file only onceWhich issue(s) this PR fixes:
Fixes #419
What kind of pull this is:
Additional Documentation:
Has compatibility for windows paths and directory separator