Rename C api
Summary: This renames the core C api to use the new Yoga branding. Differential Revision: D4259190 fbshipit-source-id: 26c8b356ca464d4304f5f9dc4192bff10cea2dc9
This commit is contained in:
committed by
Facebook Github Bot
parent
f7cc614d67
commit
dda24b1e23
42
CSSLayout/YGMacros.h
Normal file
42
CSSLayout/YGMacros.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define YG_EXTERN_C_BEGIN extern "C" {
|
||||
#define YG_EXTERN_C_END }
|
||||
#else
|
||||
#define YG_EXTERN_C_BEGIN
|
||||
#define YG_EXTERN_C_END
|
||||
#endif
|
||||
|
||||
#ifdef _WINDLL
|
||||
#define WIN_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define WIN_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef FB_ASSERTIONS_ENABLED
|
||||
#define FB_ASSERTIONS_ENABLED 1
|
||||
#endif
|
||||
|
||||
#if FB_ASSERTIONS_ENABLED
|
||||
#define YG_ABORT() abort()
|
||||
#else
|
||||
#define YG_ABORT()
|
||||
#endif
|
||||
|
||||
#ifndef YG_ASSERT
|
||||
#define YG_ASSERT(X, message) \
|
||||
if (!(X)) { \
|
||||
YGLog(YGLogLevelError, "%s", message); \
|
||||
YG_ABORT(); \
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user