JsRust.h (866B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 /* 6 * Checking for jsrust crate availability for linking. 7 * For testing, define MOZ_PRETEND_NO_JSRUST to pretend 8 * that we don't have jsrust. 9 */ 10 11 #ifndef mozilla_JsRust_h 12 #define mozilla_JsRust_h 13 14 /* MOZ_HAS_JSRUST is defined as a macro function instead of a macro definition 15 * so that checking #if MOZ_HAS_JSRUST() when this header is not included ends 16 * up as an error, where #if MOZ_HAS_JSRUST or #ifdef MOZ_HAS_JSRUST would 17 * silently pass. 18 */ 19 #if (defined(MOZ_HAS_MOZGLUE) || defined(MOZILLA_INTERNAL_API)) && \ 20 !defined(MOZ_PRETEND_NO_JSRUST) 21 # define MOZ_HAS_JSRUST() 1 22 #else 23 # define MOZ_HAS_JSRUST() 0 24 #endif 25 26 #endif // mozilla_JsRust_h