CCF
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include <quickjs/quickjs.h>
6
8{
9// "compound literals are a C99-specific feature"
10// Used heavily by QuickJS, including in macros (such as
11// ccf::js::core::constants::Null). Rather than disabling throughout the code,
12// we replace those with const instances here
13#pragma clang diagnostic push
14#pragma clang diagnostic ignored "-Wc99-extensions"
15 static constexpr JSValue Null = JS_NULL;
16 static constexpr JSValue Undefined = JS_UNDEFINED;
17 static constexpr JSValue False = JS_FALSE;
18 static constexpr JSValue True = JS_TRUE;
19 static constexpr JSValue Exception = JS_EXCEPTION;
20#pragma clang diagnostic pop
21}
Definition constants.h:8