react-native-macos/React
James Ide e193a13ef7 [Bridge] `RCT_REMAP_METHOD(js_name, selector)`
Summary:
cc @a2 @nicklockwood

This diff introduces a new macro called `RCT_EXPORT_NAMED_METHOD`, which is like `RCT_EXPORT_METHOD` but lets you choose the name of the method in JS. This diff is backwards compatible with the `RCT_EXPORT_METHOD` and legacy `RCT_EXPORT` macros.

The entries in the data segment now contain `__func__`, the Obj-C selector signature, and the JS name. If the JS name is `NULL`, we take the legacy `RCT_EXPORT` code path. If the JS name is an empty string, we use the Obj-C selector's name up to the first colon (that is, the behavior of `RCT_EXPORT_METHOD`).

Since there are three values in each data segment entry, the macros now specify 1-byte alignment. Without the byte alignment, the compiler defaults to 2-byte alignment meaning that each entry takes up 4 bytes instead of 3. The extra byte isn't a concern but being explicit about the alignment should reduce compiler surprises.
Closes https://github.com/facebook/react-native/pull/802
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-14 12:55:19 -08:00
..
Base [Bridge] `RCT_REMAP_METHOD(js_name, selector)` 2015-04-14 12:55:19 -08:00
Executors [ReactNative] Fix logging 2015-04-13 12:51:20 -08:00
Layout [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
Modules Cleanup 2015-04-11 14:19:49 -08:00
React.xcodeproj Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
Views [ReactNative] Remove bridge retaining cycles 2015-04-10 07:20:37 -08:00