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
d697bbe0a5
commit
499d28d021
@@ -12,7 +12,7 @@ public class YogaConfig {
|
|||||||
|
|
||||||
public static int SPACING_TYPE = 1;
|
public static int SPACING_TYPE = 1;
|
||||||
|
|
||||||
long mNativePointer;
|
private long mNativePointer;
|
||||||
private YogaLogger mLogger;
|
private YogaLogger mLogger;
|
||||||
private YogaNodeCloneFunction mYogaNodeCloneFunction;
|
private YogaNodeCloneFunction mYogaNodeCloneFunction;
|
||||||
|
|
||||||
@@ -76,4 +76,8 @@ public class YogaConfig {
|
|||||||
public YogaLogger getLogger() {
|
public YogaLogger getLogger() {
|
||||||
return mLogger;
|
return mLogger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long getNativePointer() {
|
||||||
|
return mNativePointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
YogaNodeJNIBase(YogaConfig config) {
|
YogaNodeJNIBase(YogaConfig config) {
|
||||||
this(YogaNative.jni_YGNodeNewWithConfig(config.mNativePointer));
|
this(YogaNative.jni_YGNodeNewWithConfig(config.getNativePointer()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
Reference in New Issue
Block a user