mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
Handle new Context creation API on the FFI
This adopts the FFI API to use the new Context::new() and Contest::drop() Rust-style APIs while preserving the semantics of the existing FFI API. It introduces a wrapper around the context which keeps an optional reference to the actual context, changing dc_open() and dc_close() to create/destroy the actual reference. This changes the events emitted on closing slightly: they only get emitted when dc_close() was called while the context was open. While dc_close() remains idempotent in that it can still be called safely multiple times, the close events will only occur if the context is actually closed.
This commit is contained in:
committed by
Floris Bruynooghe
parent
afc9a31080
commit
a3f64d4e95
@@ -237,7 +237,6 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::test_utils::*;
|
||||
|
||||
|
||||
use crate::constants::DC_CONTACT_ID_SELF;
|
||||
use crate::types::uintptr_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user