Fix build issues on Android
GCC was more strict with how we handled some types.
This commit is contained in:
parent
73cfca7d81
commit
8ff23b5411
|
@ -15,15 +15,9 @@ include $(CLEAR_VARS)
|
|||
LOCAL_MODULE := librealmreact
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
src/js_collection.cpp \
|
||||
src/js_list.cpp \
|
||||
src/js_results.cpp \
|
||||
src/js_init.cpp \
|
||||
src/js_realm.cpp \
|
||||
src/js_util.cpp \
|
||||
src/js_object.cpp \
|
||||
src/js_schema.cpp \
|
||||
src/rpc.cpp \
|
||||
src/jsc/jsc_init.cpp \
|
||||
src/android/platform.cpp \
|
||||
src/android/io_realm_react_RealmReactModule.cpp \
|
||||
src/android/jsc_override.cpp \
|
||||
|
@ -43,6 +37,7 @@ LOCAL_SRC_FILES := \
|
|||
vendor/base64.cpp
|
||||
|
||||
LOCAL_C_INCLUDES := src
|
||||
LOCAL_C_INCLUDES += src/jsc
|
||||
LOCAL_C_INCLUDES += src/object-store/src
|
||||
LOCAL_C_INCLUDES += src/object-store/src/impl
|
||||
LOCAL_C_INCLUDES += src/object-store/src/parser
|
||||
|
|
|
@ -23,7 +23,9 @@
|
|||
#include "rpc.hpp"
|
||||
#include "platform.hpp"
|
||||
|
||||
static realm_js::RPCServer *s_rpc_server;
|
||||
using namespace realm::rpc;
|
||||
|
||||
static RPCServer *s_rpc_server;
|
||||
extern bool realmContextInjected;
|
||||
|
||||
JNIEXPORT void JNICALL Java_io_realm_react_RealmReactModule_setDefaultRealmFileDirectory
|
||||
|
@ -46,7 +48,7 @@ JNIEXPORT jlong JNICALL Java_io_realm_react_RealmReactModule_setupChromeDebugMod
|
|||
if (s_rpc_server) {
|
||||
delete s_rpc_server;
|
||||
}
|
||||
s_rpc_server = new realm_js::RPCServer();
|
||||
s_rpc_server = new RPCServer();
|
||||
return (jlong)s_rpc_server;
|
||||
}
|
||||
|
||||
|
@ -55,8 +57,8 @@ JNIEXPORT jstring JNICALL Java_io_realm_react_RealmReactModule_processChromeDebu
|
|||
{
|
||||
const char* cmd = env->GetStringUTFChars(chrome_cmd, NULL);
|
||||
const char* args = env->GetStringUTFChars(chrome_args, NULL);
|
||||
realm_js::json json = realm_js::json::parse(args);
|
||||
realm_js::json response = s_rpc_server->perform_request(cmd, json);
|
||||
json parsed_args = json::parse(args);
|
||||
json response = s_rpc_server->perform_request(cmd, parsed_args);
|
||||
env->ReleaseStringUTFChars(chrome_cmd, cmd);
|
||||
env->ReleaseStringUTFChars(chrome_args, args);
|
||||
return env->NewStringUTF(response.dump().c_str());
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <mutex>
|
||||
#include <JavaScriptCore/JSContextRef.h>
|
||||
|
||||
#include "js_init.h"
|
||||
#include "jsc_init.h"
|
||||
#include "shared_realm.hpp"
|
||||
#include "realm_coordinator.hpp"
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "../platform.hpp"
|
||||
#include "../js_init.h"
|
||||
#include <string>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../platform.hpp"
|
||||
|
||||
std::string s_default_realm_directory;
|
||||
|
||||
namespace realm {
|
||||
|
|
|
@ -37,9 +37,9 @@ class List {
|
|||
using ContextType = typename T::Context;
|
||||
using ObjectType = typename T::Object;
|
||||
using ValueType = typename T::Value;
|
||||
using Object = Object<T>;
|
||||
using Value = Value<T>;
|
||||
using ReturnValue = ReturnValue<T>;
|
||||
using Object = js::Object<T>;
|
||||
using Value = js::Value<T>;
|
||||
using ReturnValue = js::ReturnValue<T>;
|
||||
|
||||
public:
|
||||
static ObjectType create_instance(ContextType, realm::List &);
|
||||
|
@ -62,7 +62,7 @@ class List {
|
|||
|
||||
template<typename T>
|
||||
struct ListClass : ClassDefinition<T, realm::List, CollectionClass<T>> {
|
||||
using List = List<T>;
|
||||
using List = js::List<T>;
|
||||
|
||||
std::string const name = "List";
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ struct NativeAccessor {
|
|||
using ContextType = typename T::Context;
|
||||
using ObjectType = typename T::Object;
|
||||
using ValueType = typename T::Value;
|
||||
using Object = Object<T>;
|
||||
using Value = Value<T>;
|
||||
using Object = js::Object<T>;
|
||||
using Value = js::Value<T>;
|
||||
|
||||
static bool dict_has_value_for_key(ContextType ctx, ValueType dict, const std::string &prop_name) {
|
||||
ObjectType object = Value::validated_to_object(ctx, dict);
|
||||
|
|
|
@ -47,7 +47,7 @@ class RealmDelegate : public BindingContext {
|
|||
using FunctionType = typename T::Function;
|
||||
using ObjectType = typename T::Object;
|
||||
using ValueType = typename T::Value;
|
||||
using Value = Value<T>;
|
||||
using Value = js::Value<T>;
|
||||
|
||||
using ObjectDefaultsMap = typename Schema<T>::ObjectDefaultsMap;
|
||||
using ConstructorMap = typename Schema<T>::ConstructorMap;
|
||||
|
@ -121,10 +121,10 @@ class Realm {
|
|||
using FunctionType = typename T::Function;
|
||||
using ObjectType = typename T::Object;
|
||||
using ValueType = typename T::Value;
|
||||
using String = String<T>;
|
||||
using Object = Object<T>;
|
||||
using Value = Value<T>;
|
||||
using ReturnValue = ReturnValue<T>;
|
||||
using String = js::String<T>;
|
||||
using Object = js::Object<T>;
|
||||
using Value = js::Value<T>;
|
||||
using ReturnValue = js::ReturnValue<T>;
|
||||
using NativeAccessor = realm::NativeAccessor<ValueType, ContextType>;
|
||||
|
||||
public:
|
||||
|
@ -189,7 +189,7 @@ class Realm {
|
|||
|
||||
template<typename T>
|
||||
struct RealmClass : ClassDefinition<T, SharedRealm> {
|
||||
using Realm = Realm<T>;
|
||||
using Realm = js::Realm<T>;
|
||||
|
||||
std::string const name = "Realm";
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ class RealmObject {
|
|||
using FunctionType = typename T::Function;
|
||||
using ObjectType = typename T::Object;
|
||||
using ValueType = typename T::Value;
|
||||
using String = String<T>;
|
||||
using Value = Value<T>;
|
||||
using Object = Object<T>;
|
||||
using Function = Function<T>;
|
||||
using ReturnValue = ReturnValue<T>;
|
||||
using String = js::String<T>;
|
||||
using Value = js::Value<T>;
|
||||
using Object = js::Object<T>;
|
||||
using Function = js::Function<T>;
|
||||
using ReturnValue = js::ReturnValue<T>;
|
||||
|
||||
public:
|
||||
static ObjectType create_instance(ContextType, realm::Object &);
|
||||
|
@ -50,7 +50,7 @@ class RealmObject {
|
|||
|
||||
template<typename T>
|
||||
struct RealmObjectClass : ClassDefinition<T, realm::Object> {
|
||||
using RealmObject = RealmObject<T>;
|
||||
using RealmObject = js::RealmObject<T>;
|
||||
|
||||
const std::string name = "RealmObject";
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@ class Results {
|
|||
using ContextType = typename T::Context;
|
||||
using ObjectType = typename T::Object;
|
||||
using ValueType = typename T::Value;
|
||||
using Object = Object<T>;
|
||||
using Value = Value<T>;
|
||||
using ReturnValue = ReturnValue<T>;
|
||||
using Object = js::Object<T>;
|
||||
using Value = js::Value<T>;
|
||||
using ReturnValue = js::ReturnValue<T>;
|
||||
|
||||
public:
|
||||
static ObjectType create_instance(ContextType, const realm::Results &, bool live = true);
|
||||
|
@ -60,7 +60,7 @@ class Results {
|
|||
|
||||
template<typename T>
|
||||
struct ResultsClass : ClassDefinition<T, realm::Results, CollectionClass<T>> {
|
||||
using Results = Results<T>;
|
||||
using Results = js::Results<T>;
|
||||
|
||||
std::string const name = "Results";
|
||||
|
||||
|
|
|
@ -32,9 +32,9 @@ struct Schema {
|
|||
using FunctionType = typename T::Function;
|
||||
using ObjectType = typename T::Object;
|
||||
using ValueType = typename T::Value;
|
||||
using String = String<T>;
|
||||
using Object = Object<T>;
|
||||
using Value = Value<T>;
|
||||
using String = js::String<T>;
|
||||
using Object = js::Object<T>;
|
||||
using Value = js::Value<T>;
|
||||
|
||||
using ObjectDefaults = std::map<std::string, Protected<ValueType>>;
|
||||
using ObjectDefaultsMap = std::map<std::string, ObjectDefaults>;
|
||||
|
|
Loading…
Reference in New Issue