Skip to content

Commit

Permalink
Do not inline to variant functions to prevent CI breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Dec 1, 2024
1 parent b7f12c7 commit 27030e7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions cpp/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace opsqlite {

namespace jsi = facebook::jsi;

inline jsi::Value toJSI(jsi::Runtime &rt, const JSVariant &value) {
jsi::Value toJSI(jsi::Runtime &rt, const JSVariant &value) {
if (std::holds_alternative<bool>(value)) {
return std::get<bool>(value);
} else if (std::holds_alternative<int>(value)) {
Expand All @@ -39,7 +39,7 @@ inline jsi::Value toJSI(jsi::Runtime &rt, const JSVariant &value) {
return jsi::Value::null();
}

inline JSVariant toVariant(jsi::Runtime &rt, const jsi::Value &value) {
JSVariant toVariant(jsi::Runtime &rt, const jsi::Value &value) {
if (value.isNull() || value.isUndefined()) {
return JSVariant(nullptr);
} else if (value.isBool()) {
Expand Down
4 changes: 2 additions & 2 deletions cpp/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ namespace opsqlite {

namespace jsi = facebook::jsi;

inline jsi::Value toJSI(jsi::Runtime &rt, const JSVariant &value);
jsi::Value toJSI(jsi::Runtime &rt, const JSVariant &value);

inline JSVariant toVariant(jsi::Runtime &rt, jsi::Value const &value);
JSVariant toVariant(jsi::Runtime &rt, jsi::Value const &value);

std::vector<std::string> to_string_vec(jsi::Runtime &rt, jsi::Value const &xs);

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ SPEC CHECKSUMS:
GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4
glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a
hermes-engine: 46f1ffbf0297f4298862068dd4c274d4ac17a1fd
op-sqlite: 9917e5a5747fc813e42487c0cbdd2d35eaa687bb
op-sqlite: fc35cf9d2d0ace5c5b7189e2ccadcfbb80e6e6f5
RCT-Folly: bf5c0376ffe4dd2cf438dcf86db385df9fdce648
RCTDeprecation: fde92935b3caa6cb65cbff9fbb7d3a9867ffb259
RCTRequired: 75c6cee42d21c1530a6f204ba32ff57335d19007
Expand Down
8 changes: 0 additions & 8 deletions op-sqlite.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,12 @@ Pod::Spec.new do |s|
else
c_sources_dir = File.join("example", "c_sources")
end


if tokenizers.any?
generate_tokenizers_header_file(tokenizers, File.join(c_sources_dir, "tokenizers.h"))
FileUtils.cp_r(c_sources_dir, __dir__)
# puts "Current directory: #{__dir__}"
# c_sources_dir_output = Dir.glob(File.join(c_sources_dir, "**/*.{h,cpp}"))

# puts "c_sources_dir: #{c_sources_dir_output}"

# # Add all .h and .c files from the `c_sources` directory
source_files += Dir.glob(File.join("c_sources", "**/*.{h,cpp}"))
# source_files += ["../../c_sources/tokenizers.h", "../../c_sources/tokenizers.cpp"]
# puts "Source files: #{source_files}"
end

# Assign the collected source files to `s.source_files`
Expand Down

0 comments on commit 27030e7

Please sign in to comment.