Skip to content

Commit 97430c8

Browse files
coadometa-codesync[bot]
authored andcommitted
Include definitions behind __cplusplus macro (#55902)
Summary: Pull Request resolved: #55902 Includes definitions behind the `__cplusplus` macro to also be visible in the API snapshot. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D95189538 fbshipit-source-id: 35a632b83b6d6c4f330ac80b52b4ee203f692748
1 parent f2ea073 commit 97430c8

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

scripts/cxx-api/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ ReactApple:
6161
- "*/platform/macos/*"
6262
- "*/platform/android/*"
6363
definitions:
64+
__cplusplus: 1
6465
variants:
6566
debug:
6667
definitions:

scripts/cxx-api/tests/snapshots/.doxygen.config.template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2442,7 +2442,8 @@ INCLUDE_FILE_PATTERNS =
24422442
# recursively expanded use the := operator instead of the = operator.
24432443
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
24442444

2445-
PREDEFINED = FOLLY_PACK_PUSH="" \
2445+
PREDEFINED = __cplusplus=1 \
2446+
FOLLY_PACK_PUSH="" \
24462447
FOLLY_PACK_POP="" \
24472448
FOLLY_PACK_ATTR="" \
24482449
__attribute__(x)="" \
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
category RCTBridgeProxy(Cxx) {
2+
public @property (assign) int cxxOnlyProperty;
3+
}
4+
5+
interface RCTBridgeProxy : public NSObject {
6+
public @property (assign) int cxxOnlyProperty;
7+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
@interface RCTBridgeProxy : NSObject
9+
10+
@end
11+
12+
@interface RCTBridgeProxy (Cxx)
13+
14+
#ifdef __cplusplus
15+
@property (nonatomic, readwrite) int cxxOnlyProperty;
16+
#endif
17+
18+
@end

0 commit comments

Comments
 (0)