diff options
author | pat-s | 2018-03-04 20:19:56 +0100 |
---|---|---|
committer | pat-s | 2018-03-04 20:19:56 +0100 |
commit | eca02c0286853717fb82b9f3a91b3c3ffbb7d6da (patch) | |
tree | 5149a1e3aedac0eb6c765ed09201f418a7f39eeb /0015-Backport-Utils-ApiCheck.patch | |
parent | 8fb7d7687be1fdc6908573c8895b0d1ada9d5716 (diff) | |
download | aur-eca02c0286853717fb82b9f3a91b3c3ffbb7d6da.tar.gz |
update sources
Diffstat (limited to '0015-Backport-Utils-ApiCheck.patch')
-rw-r--r-- | 0015-Backport-Utils-ApiCheck.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/0015-Backport-Utils-ApiCheck.patch b/0015-Backport-Utils-ApiCheck.patch new file mode 100644 index 000000000000..66425a59de2d --- /dev/null +++ b/0015-Backport-Utils-ApiCheck.patch @@ -0,0 +1,29 @@ +From be3df35d659a9dd3c59eb29abdcc10d74b8fc90a Mon Sep 17 00:00:00 2001 +From: Balint Reczey <balint@balintreczey.hu> +Date: Mon, 9 Jan 2017 18:12:23 +0100 +Subject: [PATCH 15/16] Backport Utils::ApiCheck() + +--- + src/api.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/api.h b/src/api.h +index 7197b6c..c7877aa 100644 +--- a/src/api.h ++++ b/src/api.h +@@ -183,6 +183,12 @@ class RegisteredExtension { + class Utils { + public: + static bool ReportApiFailure(const char* location, const char* message); ++ static inline bool ApiCheck(bool condition, ++ const char* location, ++ const char* message) { ++ if (!condition) Utils::ReportApiFailure(location, message); ++ return condition; ++ } + + static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj); + static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj); +-- +2.1.4 + |