From 9b23ee0855e09dffd96973354aad443e5f170627 Mon Sep 17 00:00:00 2001 From: Emily Toop Date: Mon, 14 May 2018 14:19:05 +0100 Subject: [PATCH] Exclude Xcode's build directory, not Rust's --- .gitignore | 2 +- ffi/src/lib.rs | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 1e284e6e..8abb0fce 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,7 @@ pom.xml.asc /fixtures/*.db-wal /query-parser/out/ ## Build generated -build/ +/sdks/swift/Mentat/build/ DerivedData build.xcarchive diff --git a/ffi/src/lib.rs b/ffi/src/lib.rs index 1bd3f049..fc7d734b 100644 --- a/ffi/src/lib.rs +++ b/ffi/src/lib.rs @@ -30,15 +30,12 @@ //! Pointers to values that are guaranteed to live beyond the lifetime of the function, //! are passed over the FFI as a raw pointer. //! -//! ``` -//! value as *const TypedValue -//! ``` +//! `value as *const Binding` +//! //! Pointers to values that cannot be guaranteed to live beyond the lifetime of the function //! are first `Box`ed so that they live on the heap, and the raw pointer passed this way. //! -//! ``` -//! Box::into_raw(Box::new(value)) -//! ``` +//! `Box::into_raw(Box::new(value))` //! //! The memory for a value that is moved onto the heap before being passed over the FFI //! is no longer managed by Rust, but Rust still owns the value. Therefore the pointer @@ -50,9 +47,7 @@ //! //! A macro has been provided to make defining destructors easier. //! -//! ``` -//! define_destructor!(query_builder_destroy, QueryBuilder); -//! ``` +//! `define_destructor!(query_builder_destroy, QueryBuilder);` //! //! Passing a pointer to memory that has already been released will cause Mentat to crash, //! so callers have to be careful to ensure they manage their pointers properly. @@ -71,7 +66,7 @@ //! native access pattern to callers and to enable easier passing of optional types and error //! propogation. These types have implemented [From](std::convert::From) such that conversion from the Rust type //! to the C type is as painless as possible. -//! + extern crate libc; extern crate mentat;