Commit Graph

341 Commits

Author SHA1 Message Date
David Anderson
67f0e4be60 Update SourcePawn and AMTL. 2020-06-01 13:22:29 -07:00
David Anderson
80acff8d7d Replace ke::LinkedList with std::list. 2020-05-31 23:19:41 -07:00
David Anderson
d5d4d78023 Update SourcePawn and AMTL to fix the Mac build. 2020-05-31 22:57:14 -07:00
David Anderson
5d94f0bea8 Replace ke::Vector with std::vector. 2020-05-31 11:35:51 -07:00
David Anderson
288a781555 Fix startup crash. 2020-05-30 19:10:23 -07:00
David Anderson
979e410efc Update AMTL, replace ke::Deque with std::deque. 2020-05-30 12:44:02 -07:00
David Anderson
6d2e0aa684 Fix Windows build. 2020-05-21 00:11:23 -07:00
David Anderson
b725196a26 Replace AString with std::string. 2020-05-20 17:57:18 -07:00
David Anderson
301bafa3f5 Replace more Move/Forward with STL variants. 2020-05-19 12:56:28 -07:00
David Anderson
7d7253c9cc Update AMTL; replace AutoPtr/UniquePtr with STL. 2020-05-18 18:19:16 -07:00
David Anderson
c2df49ee33 Rename ke::Lambda to ke::Function. 2020-05-17 12:33:52 -07:00
David Anderson
a253e175bb Replace all uses of AMTL threads with STL threads.
This also rewrites the work loop for threaded queries. It has been
simplified significantly.
2020-05-16 22:35:56 -07:00
David Anderson
f76cb94511 Pare down ThreadSupport and remove ancient thread code.
This patch removes almost all of the existing platform-specific
ThreadSupport code, as well as code derived from it. It is now
implemented on top of C++11 threads and is much simpler.

This is the first inclusion of STL in SourceMod. Mac and Windows are
allowed to dynamically link to their respective implementations. On
Linux, libstdc++ is statically linked, except in the cases where it was
already dynamically linked (csgo, blade).

IEventSignal has been retained because sourcemod-curl-extension relies
on it. As written, it is impossible to use as a condition variable,
because the caller does not have access to the underlying mutex. There
is no way to make this API safe or non-racy, so extensions relying on
it should switch to C++11 threads.

ThreadWorker is now pared down and does not interact or inherit from
BaseWorker in any way. Basic functionality has been tested. Since it is
not used anywhere in SourceMod, or seemingly in any repository on
GitHub, it's unclear whether it should even exist. But it has been
tested in this patch.

This change bumps the minimum macOS version to OS X 10.7, and the
minimum C++ standard level to C++14.
2020-05-13 00:35:29 -07:00
Loïc
d42c304a55
Bump version for non-VCS builds (#1243) 2020-04-27 15:50:03 +01:00
SM9
4d38f11367 Clarify detour creation errors (#1191)
A logic error here meant that it wasn't printing the failing sig name in the common case
2020-02-26 19:14:51 +00:00
David Anderson
7ab3a3cfd9 Update SourcePawn to master.
This turns on the new expression parser by default.
2019-10-28 21:19:22 -07:00
David Anderson
32cb00a4c6 Update SourcePawn. 2019-09-15 11:38:21 -07:00
David Anderson
94b3ca08a2 Update SourcePawn & amtl submodules (#1067) 2019-09-01 13:24:39 -07:00
Headline
28036966a6
Fix Miscellaneous Regressions and UBs (#1022) 2019-05-28 18:04:08 -07:00
Michael Flaherty
9cd2a74271
Fix ArgBuffer String Serialization (#999) 2019-05-04 01:46:55 -07:00
Michael Flaherty
e2eac382c0
Add templated helper class to promote type-safety (#965) 2019-04-12 12:10:37 -07:00
Michael Flaherty
dd81d7c78f
Incorperate Licensing Into Project Tree (#961) 2019-04-12 12:10:13 -07:00
peace-maker
e3f4d239f1 IBinTools: Block loading incompatible interface versions (#979)
In #705 SourceMod received support for x64 binaries. The `IBinTools` interface was updated to call functions in 64bit binaries. The `PassInfo` struct's size was increased and the `Create(V)Call()` functions signatures changed, thus making the interface incompatible for consumers which were compiled against an earlier version.

`SMInterface::IsVersionCompatible` wasn't adjusted to that fact, so extensions compiled against pre SM 1.10 could request an `IBinTools` interface pointer, but crash when they try to use it.

This change makes requests to older interface versions invalid, thus letting `RequestInterface` return `NULL` for older extensions. It doesn't fix the backwards incompatibility, but at least makes the problem more blatant, so extensions can handle it themselves.
2019-04-11 14:51:38 -07:00
Deathreus
1b3599c189 Bump non-critical versioning to 1.10 (#939) 2018-12-27 21:02:14 -05:00
David Anderson
f465985370 Update SourcePawn and AMTL to master.
This brings in enum struct support.
2018-12-15 12:17:11 -08:00
SlidyBat
bece74491d NPOTB: Update sample extension params to be sourcehook-friendly (#886) 2018-09-22 21:55:05 -07:00
Asher Baker
ba8b42ef1b
Burninate IDataPack (#864)
This doesn't break any extensions NOT using IDataPack, and we do not know of any that are.

* The extension storage utility of this interface has been broken for the last 9 months, with ISourceMod::CreateDataPack being disabled.
* The plugin interop utility of this interface (its stated purpose) has been broken for the last 11+ years, with ISourceMod::GetDataPackHandleType being disabled.

I imagine it only survived the first cleanup 11 years ago because CSS:DM was using it internally, which it has now been migrated away from.

Compiled all the included extensions without changes (API compat), and loaded extensions build pre-change without issue (ABI compat).
2018-08-13 23:03:48 +01:00
KliPPy
a81b52a787 Add move semantics for StringHashMap (#589)
* Move semantics for StringHashMap

* style

* Update sm_stringhashmap.h
2018-07-12 11:25:22 -07:00
Michael Flaherty
aaac0b9eb2 Individualize NameHashSet Hashing & Revisit #709 (#740)
* Make mac/win lookups lowercase'd

* Revert #709 & 81042cc

* Adjust HashPolicy implementation across sourcemod

Basically, in order to implement our own (actual) hash policy in
`PluginSys.h`, we needed to remove the blanket implementation of `hash`
that was used before. Now, each policy must implement `hash` along with
`matches` in order to be used with `NameHashSet`. While this does force
us to change every implementation of policies across the entirety of
sourcemod, it allows core to use flexible implementations of `hash`.

* Remove logic duplication

* Improve lowercase checks
2018-07-10 17:38:40 -04:00
Asher Baker
4f70185aef Fix amtl submodule pin 2018-06-05 19:06:04 +01:00
David Anderson
90e66cbeef Update SourcePawn. 2018-05-31 23:13:36 -07:00
David Anderson
25b3d8f354 Update AMTL. 2018-05-31 21:23:59 -07:00
Nick Hastings
a69d18ae1c Fix warning/error on newer Clang versions from abort not being defined. 2018-05-06 10:28:24 -04:00
Michael Flaherty
5611ec54a2 Migrate extensions to common AMTL string funcs (#785) 2018-03-25 13:00:53 -07:00
Kyle Sanderson
5f5a6b3a16
Migrate CDataPack from a Compact Cassette tape. (#688)
* Migrate CDataPack from a Cassette Tape.

Tested-By: Headline22.

* Remove last IsReadable param pass.

* populate len still if CDataPack::ReadString is unreadable or the wrong type.

* Fyren Fixes(TM)(R)(C).

* Deprecate IDataPack.
2017-12-29 19:56:02 -08:00
Scott Ehlert
ce1a4dcac0
64-bit support for CSGO on Linux and macOS (#705) 2017-12-20 01:56:23 -06:00
Michael Flaherty
d685f30847 Add Translation Natives (#669)
* Add Translation Natives

See #626

* Fix vocab errors
* Better description
* Bump ITranslator Version
* Implement KyleS' Review Requests
* Improve documentation
2017-11-20 21:24:01 -08:00
Nicholas Hastings
95afe72307
Separate out DOI build. (#718) 2017-11-03 15:45:16 -04:00
Asher Baker
4bab834716
Merge pull request #672 from peace-maker/null_natives_fixed
Add natives to check for NULL_VECTOR and NULL_STRING
2017-10-27 20:03:09 +01:00
Scott Ehlert
373fb4f776 Update amtl to fix macOS build. 2017-10-26 19:36:30 -05:00
Peace-Maker
7eef3948b1 Don't break backwards compatibility with unmanaged forwards
Instead of adding new functions to `IForward`, we just allow NULL to be passed to `PushArray` and `PushString`.
2017-08-25 23:23:50 +02:00
Peace-Maker
41a9889cdd Add Call_PushNullVector and Call_PushNullString
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call.
The callee can check the parameter using the IsNullVector/IsNullString natives.
2017-08-25 23:23:24 +02:00
Asher Baker
11aab699a5 Revert "Add natives to check for NULL_VECTOR and NULL_STRING" 2017-08-04 00:44:47 +01:00
Peace-Maker
de42dfc783 Add Call_PushNullVector and Call_PushNullString
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call.
The callee can check the parameter using the IsNullVector/IsNullString natives.
2017-05-04 22:56:31 -06:00
peace-maker
3e201dd521 Add DETOUR_DECL_* marcos for more parameter counts (#561)
Add more macros for up to 8 parameters, because DETOUR_DECL_MEMBER8 is
the highest one yet.
2016-11-29 14:55:39 -08:00
David Anderson
27e812461f Update to the latest SourcePawn and AMTL. 2016-09-24 16:45:04 -07:00
Kyle Sanderson
015b9e92b6 Sync AMTL with upstream fixes. (#538) 2016-08-28 14:01:53 -07:00
Peace-Maker
ecbedb7b11 Don't expose CellArrays in ISourceMod to extensions
Don't let extensions have access to the internal implementation of cell
arrays.
2016-08-26 15:09:18 -07:00
Peace-Maker
5b9ae5917b Add ICellArray and create/free in ISourceMod
Add an ICellArray interface to expose the adt_array CellArray class from
logic to core.
Add methods to ISourceMod to create and delete ICellArray instances in
logic.
2016-08-21 21:32:23 +02:00
David Anderson
a7f5fb7a08 Fix Linux build. 2016-07-26 14:46:58 -07:00