mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Expose native pointer thru an interface function for YogaConfig
Summary: Expose native pointer thru an interface function for YogaConfig (its package private to `com.facebook.yoga` namespace), This way we can make later on YogaConfig a pure abstract class. Plus, it makes sure external users don't modify the pointer Reviewed By: SidharthGuglani Differential Revision: D17266401 fbshipit-source-id: f39b488cea0b73bc3578bb3aa90ab00139bf9271
This commit is contained in:
committed by
Facebook Github Bot
parent
393b5f27d2
commit
487ff2acbc
@@ -12,7 +12,7 @@ public class YogaConfig {
|
||||
|
||||
public static int SPACING_TYPE = 1;
|
||||
|
||||
long mNativePointer;
|
||||
private long mNativePointer;
|
||||
private YogaLogger mLogger;
|
||||
private YogaNodeCloneFunction mYogaNodeCloneFunction;
|
||||
|
||||
@@ -76,4 +76,8 @@ public class YogaConfig {
|
||||
public YogaLogger getLogger() {
|
||||
return mLogger;
|
||||
}
|
||||
|
||||
long getNativePointer() {
|
||||
return mNativePointer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
}
|
||||
|
||||
YogaNodeJNIBase(YogaConfig config) {
|
||||
this(YogaNative.jni_YGNodeNewWithConfig(config.mNativePointer));
|
||||
this(YogaNative.jni_YGNodeNewWithConfig(config.getNativePointer()));
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
|
||||
Reference in New Issue
Block a user