-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not include files that have already been included.
If two #included files have the same inode, only the first include will be parsed. This obsoletes the "#if ... #endinput" hack in every include file. Nominally #include in SourcePawn was the same as C/C++, where you can include the same file over and over. This is useful in C/C++ for creating macro expansion tables. It's not useful in Pawn, where those tricks don't work, and as evidenced by the fact that not a single plugin in the corpus was affected by this change. This greatly simplifies how static scopes are handled, since SourcePawn's notion of a static scope is per-file, rather than per-translation unit. This simplification re-opens the door to multiple translation units, an important step for an upcoming refactoring of how builtins work.
- Loading branch information
Showing
6 changed files
with
67 additions
and
45 deletions.
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 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
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
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,31 @@ | ||
// vim: set sts=4 ts=8 sw=4 tw=99 et: | ||
// | ||
// Copyright (C) 2023 AlliedModders LLC | ||
// | ||
// SourcePawn is free software: you can redistribute it and/or modify it under | ||
// the terms of the GNU General Public License as published by the Free | ||
// Software Foundation, either version 3 of the License, or (at your option) | ||
// any later version. | ||
// | ||
// SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY | ||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License along with | ||
// SourcePawn. If not, see http://www.gnu.org/licenses/. | ||
|
||
#pragma once | ||
|
||
#include <deque> | ||
|
||
#include "stl-allocator.h" | ||
|
||
namespace sp { | ||
namespace tr { | ||
|
||
template <typename T> | ||
using deque = std::deque<T, StlAllocator<T>>; | ||
|
||
} // namespace tr | ||
} // namespace sp | ||
|