Alexander Krotov
ea84edf13a
Implement dc_array_t::len()
2019-07-27 19:28:39 +03:00
Alexander Krotov
c335348f20
Implement dc_array_t::is_empty()
2019-07-27 19:28:39 +03:00
Alexander Krotov
1e91f6a204
Merge dc_array_free_ptr into dc_array_unref
2019-07-27 19:28:39 +03:00
Alexander Krotov
dfd43cbb97
Rename dc_array_new_typed into dc_array_new_locations
...
dc_array_new_typed is only used internally, so we can change its API.
2019-07-27 19:28:39 +03:00
Alexander Krotov
c7a6b3caae
Remove unnecessary check in dc_array_new_typed
...
Allocating Vec with 0 capacity is correct.
2019-07-27 19:28:39 +03:00
Alexander Krotov
f3eea41914
Reimplement dc_array_new without dc_array_new_typed
2019-07-27 19:28:39 +03:00
Alexander Krotov
1f63753a8b
Simplify dc_array_search_id
2019-07-27 19:28:39 +03:00
Alexander Krotov
e796a4c438
Move dc_array_add_{uint,id} implementations into dc_array_t
2019-07-27 19:28:39 +03:00
Alexander Krotov
85dfd65e48
Simplify dc_array_get_string
2019-07-27 19:28:39 +03:00
Alexander Krotov
a323fe68a6
Simplify dc_array_duplicate
2019-07-27 19:28:39 +03:00
Alexander Krotov
05aca2c529
Make dc_array_new and dc_array_new_typed safe
...
Just like Box::into_raw, these functions are safe,
even though the caller is responsible for the allocated structure.
2019-07-27 19:16:42 +03:00
Alexander Krotov
1dfad65afd
dc_array.rs: remove magic field
...
It was always set to DC_ARRAY_MAGIC, except immediately before freeing the memory.
2019-07-27 19:16:42 +03:00
Alexander Krotov
e15e3a1e84
Use Vec to store dc_array_t data
2019-07-27 18:25:24 +03:00
Alexander Krotov
252697b174
Implement dc_array_t::new() and use Box to allocate dc_array_t
2019-07-27 18:25:24 +03:00
Alexander Krotov
7764ab3ff3
Replace C loop with Rust loop in dc_array_search_id
2019-07-27 18:25:24 +03:00
Alexander Krotov
7585dc49e3
Replace C loop with Rust loop in dc_array_free_ptr
2019-07-27 18:25:24 +03:00
Alexander Krotov
f0ae5fcd7c
Add DC_ARRAY_LOCATIONS constant
2019-07-27 18:25:24 +03:00
Alexander Krotov
7cba2b3f66
Remove unused dc_array_sort_strings
2019-07-27 18:25:23 +03:00
Alexander Krotov
a0594338b2
Remove repr(C) from dc_array_t
...
All members of dc_array_t structure are private, C code does not need to interact with them.
2019-07-27 17:14:09 +03:00
Alexander Krotov
9f75a5049e
dc_location: store marker as Option<String> instead of C string
2019-07-25 22:41:33 +02:00
Alexander Krotov
a791f76e4b
Rename _dc_location into dc_location
2019-07-25 22:41:33 +02:00
Alexander Krotov
cb75ac3842
Remove dc_location_t
...
dc_location_t is an incomplete copy of _dc_location
The difference is that it lacks `int independent` field.
As a result, calloc did not allocate memory for this field.
deltachat-core (C version) has only one dc_location_t, that includes the last field.
2019-07-24 09:37:04 +02:00
Alexander Krotov
648d3d78aa
Remove dc_arr_to_string function that was used only once
2019-07-23 10:09:52 +02:00
holger krekel
8089559958
Squashed commit of the following:
...
commit 6bc5d1b90e
Author: holger krekel <holger@merlinux.eu >
Date: Sun Jul 21 22:56:37 2019 +0200
fix fmt
commit 197d94ad9d
Merge: 7ce337c 686678c
Author: holger krekel <holger@merlinux.eu >
Date: Sun Jul 21 22:51:16 2019 +0200
Merge remote-tracking branch 'origin/master' into eventlogging
commit 7ce337c6d0
Author: holger krekel <holger@merlinux.eu >
Date: Sun Jul 21 22:44:27 2019 +0200
left-over error logging
commit 10148d2e43
Author: holger krekel <holger@merlinux.eu >
Date: Sun Jul 21 22:03:17 2019 +0200
ignore non-utf8 parts of header fields (add comment why it shouldn't happen)
don't throw error if no sql rows are returned
commit 69dc237ee3
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sun Jul 21 12:56:04 2019 +0200
fix(receive_imf): remove recursive sql call
commit df5464ea80
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sat Jul 20 17:05:24 2019 +0200
fix: blocked is an optional value
commit e4bf9956a5
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sat Jul 20 16:50:56 2019 +0200
fix(msg): handle optional in_reply_to
commit d353d9d9d8
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sat Jul 20 16:17:25 2019 +0200
fix(chat): remove recursive sql usage
commit 1ad45ed4d6
Author: holger krekel <holger@merlinux.eu >
Date: Sat Jul 20 15:14:11 2019 +0200
fix rust fmt
commit 496e980a17
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Sat Jul 20 14:34:20 2019 +0200
use forked rusqlite
commit fa09e46ed9
Author: holger krekel <holger@merlinux.eu >
Date: Sat Jul 20 12:37:51 2019 +0200
another pace where we might (and in my case did) get invalid utf8
commit d6de420b9a
Author: holger krekel <holger@merlinux.eu >
Date: Sat Jul 20 12:30:48 2019 +0200
fix some string issues, introduce to_string_lossy such that to_string() continues to panic on non-utf8
commit 38eb708db8
Author: holger krekel <holger@merlinux.eu >
Date: Sat Jul 20 01:17:53 2019 +0200
for now make to_string() less strict as we often don't want to crash the whole app just because some non-proper utf8 came in (through a message we can't neccesarily congtrol)
commit 7a59da5f8f
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 22:48:39 2019 +0200
fix linting
commit f13a1d4a2f
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 22:46:58 2019 +0200
fix some test flakyness
commit 7b3a450918
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 22:35:07 2019 +0200
- fix saved_mime test which broke to improper conversion of
imf_raw_not_terminated
- some cargo.toml updates no clue where they come from
- log Message-ID for received messages
commit 169923b102
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 12:31:22 2019 +0200
formatting
commit 42688a0622
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 12:24:56 2019 +0200
remove some print statements
commit 35f3c0edd1
Merge: e7a2362 f58b1d6
Author: holger krekel <holger@merlinux.eu >
Date: Fri Jul 19 10:25:21 2019 +0200
Merge branch 'master' into eventlogging
commit e7a236264a
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 23:20:20 2019 +0200
print invalid strings
commit aaa5b820d9
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 23:12:35 2019 +0200
cleanup
commit e7f0745010
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 23:03:57 2019 +0200
reduce direc usage of CString
commit c68e7ae14e
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 22:47:47 2019 +0200
audit use of to_cstring and fix ub
commit 618087e5a7
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 21:38:52 2019 +0200
fix(imap): body ptr lifetime
commit 245abb8384
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 19:44:10 2019 +0200
remove debug
commit a3e1042001
Author: dignifiedquire <dignifiedquire@users.noreply.github.com >
Date: Thu Jul 18 18:30:54 2019 +0200
fix some things, add more debugging statements
commit 7b7ce9348f
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 15:11:57 2019 +0200
fix python lint issues
commit 7a4808ba0d
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 14:35:54 2019 +0200
cargofmt
commit 8f240f7153
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 14:03:57 2019 +0200
(dig,hpk) pull out job collection from sql query/lock logic
commit 7d0b5d8abb
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 12:52:02 2019 +0200
remove print statements and fix a crash
commit ee317cb1b5
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 11:38:10 2019 +0200
fix some merge issues
commit 7b736fe635
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 11:16:38 2019 +0200
(dig,hpk) add test and fix for wrong dbs
commit c7db15352a
Merge: 0b37167 0c5015d
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 09:59:44 2019 +0200
Merge branch 'master' into eventlogging
commit 0b37167be8
Author: holger krekel <holger@merlinux.eu >
Date: Thu Jul 18 00:06:05 2019 +0200
address @dignifiedquire comments
commit 5cac4b5076
Author: holger krekel <holger@merlinux.eu >
Date: Wed Jul 17 12:47:22 2019 +0200
remove spurious print
commit 475a41beb3
Author: holger krekel <holger@merlinux.eu >
Date: Wed Jul 17 12:31:12 2019 +0200
address @dignifiedquire rustyness comment and fix changelog
commit ad4be80b4e
Author: holger krekel <holger@merlinux.eu >
Date: Wed Jul 17 10:25:25 2019 +0200
make smtp/imap connect() return bool instead of c-int
commit 8737c1d142
Author: holger krekel <holger@merlinux.eu >
Date: Wed Jul 17 09:26:33 2019 +0200
cleanup some parts, add comments
commit 964fe466cc
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 20:05:41 2019 +0200
wip-commit which passes all tests with proper finalization
commit 43936e7db7
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 16:17:42 2019 +0200
snapshot of my current debugging state
commit 0e80ce9c39
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 12:57:19 2019 +0200
more aggressively skip perform API when threads are closing
commit c652bae68a
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 12:06:05 2019 +0200
intermediate wip commit
commit bc904a495d
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 11:18:56 2019 +0200
add some logging, and a more precise teardown for online python tests
commit 8d99444c6a
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 00:22:12 2019 +0200
fix std
commit 9dab53e0af
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 00:20:54 2019 +0200
rustfmt
commit 360089ac74
Author: holger krekel <holger@merlinux.eu >
Date: Tue Jul 16 00:03:49 2019 +0200
remove some debugging
commit e892c5cf4d
Author: holger krekel <holger@merlinux.eu >
Date: Mon Jul 15 23:31:30 2019 +0200
fix test for events
commit 9ad4c9a6fe
Author: holger krekel <holger@merlinux.eu >
Date: Mon Jul 15 22:51:57 2019 +0200
wip try test that we see INFO events from the core
2019-07-21 23:31:14 +02:00
Alexander Krotov
c116d6f73f
Use Rust for instead of C while in dc_array test
2019-07-21 21:27:49 +02:00
Alexander Krotov
a7c8ebc089
Replace DC_ARRAY_MAGIC #define with a constant
2019-07-21 21:26:27 +02:00
Floris Bruynooghe
855c7844b5
Rename to_str() -> as_str() to match stdlib naming convention
...
The function does a cast and does not create a new objects. The
stdlib convention is to use to_*() for functions which return new
objects and as_*() for functions which keep referring to the same data
but using a different type. Follow that convention.
2019-06-07 22:19:39 +02:00
dignifiedquire
95d4df6027
refactor: reduce dependencies on libc
2019-06-05 00:56:59 +02:00
Lars-Magnus Skog
0ffdaf254f
test: move dc_array tests
2019-05-29 23:43:08 +02:00
dignifiedquire
21341b7a51
refactor: remove sprintf
2019-05-29 02:03:55 +02:00
Friedel Ziegelmayer
0d51c7dd2e
Prepare for android builds ( #88 )
...
* upgrade ci
* fixup
* update ci script
* Update run.sh
* refactor(time): drop libc time functions
* fix(ffi): use i64 instead off time_t
* fix(ci): install croos
* fix: remove unused dc_check_password
* fix(ffi): enable ssl vendoring by default
* chore: remove unused import
* fix(deps): add vendored flag for reqwest
* chore(ci): use cross fork
* fix: handle invalid server configurations
Closes #90
* Disable android from circle ci for now
2019-05-28 17:41:50 +02:00
dignifiedquire
22868abe0e
refactor: rename dc_context to context
2019-05-27 09:32:50 +02:00
dignifiedquire
fdd870286e
refactor: move aheader to safe rust
2019-05-12 23:11:13 +02:00
Hocuri
569c924a0c
Replace types that use only 0 and 1 with bool ( #18 ) ( #58 )
...
* Start replacing int with bool where possible (#18 )
* Continue replacing int with bool where possible (#18 )
* Continue replacing int with bool where possible (#18 )
* Run fmt
2019-05-11 12:07:09 +02:00
Lars-Magnus Skog
0bbda91e77
Fix warnings on variables not needing mut ( #48 )
...
chore: fix compiler warnings (unused mut)
2019-05-08 00:44:40 +02:00
dignifiedquire
83917ef93e
wip - use mmime instead of libetpan
2019-05-07 10:45:46 +01:00
Lars-Magnus Skog
2cf6cde5d1
chore: fix compiler warnings (mut + unused assignments) ( #40 )
...
* Stop allowing unused assignments
* test: remove unused assignments in cmdline
* chore: fix compiler warnings in dc_tools.rs
* chore: fix compiler warnings in dc_token.rs
* chore: fix compiler warnings in dc_strencode.rs
* chore: fix compiler warnings in dc_stock.rs
* chore: fix compiler warnings in dc_sqlite3.rs
* chore: fix compiler warnings in dc_simplify.rs
* chore: fix compiler warnings in dc_securejoin.rs
* chore: fix compiler warnings in dc_saxparser.rs
* chore: fix compiler warnings in dc_pgp.rs
* chore: fix compiler warnings in dc_param.rs
* chore: fix compiler warnings in dc_oauth2.rs
* chore: fix compiler warnings in dc_msg.rs
* chore: fix compiler warnings in dc_mimeparser.rs
* chore: fix compiler warnings in dc_mimefactory.rs
* chore: fix compiler warnings in dc_lot.rs
* chore: fix compiler warnings in dc_loginparams.rs
* chore: fix compiler warnings in dc_log.rs
* chore: fix compiler warnings in dc_location.rs
* chore: fix compiler warnings in dc_keyring.rs
* chore: fix compiler warnings in dc_key.rs
* chore: fix compiler warnings in dc_jsmn.rs
* chore: fix compiler warnings in dc_jobthread.rs
* chore: fix compiler warnings in dc_imex.rs
* chore: fix compiler warnings in dc_hash.rs
* chore: fix compiler warnings in dc_e2ee.rs
* chore: fix compiler warnings in dc_context.rs
* chore: fix compiler warnings in dc_contact.rs
* chore: fix compiler warnings in dc_chatlist.rs
* chore: fix compiler warnings in dc_chat.rs
* chore: fix compiler warnings in dc_array.rs
* chore: fix compiler warnings in dc_apeerstate.rs
* chore: fix compiler warnings in dc_aheader.rs
* chore: fix compiler warnings in dc_array.rs
* test: remove compiler warnings in test/stress.rs
* test: reduce compiler warnings in examples/repl/main.rs
* test: std:🧵 :sleep_ms() is deprecated
* chore: remove unused variable in dc_sqlite3.rs
* chore: fix compiler warnings in dc_receive_imf.rs
* chore: fix compiler warnings in dc_job.rs
* chore: fix compiler warnings in dc_configure.rs
* Fix formatting
2019-05-05 21:58:59 +02:00
dignifiedquire
75319dbf67
continue rustification
2019-05-01 23:41:11 +02:00
dignifiedquire
72e9fe6150
start reworking context references and smtp, imap
2019-05-01 23:41:11 +02:00
dignifiedquire
e8a79f220e
refactor: use architecture dependent sizes
2019-04-28 15:18:30 +03:00
dignifiedquire
e737a32c54
cleanup: remove unused imports
2019-04-27 18:02:12 +03:00
dignifiedquire
4cf5903d60
feat: update latest deltachat-core 0.43.0
2019-04-27 17:35:49 +03:00
dignifiedquire
1faf248e09
remove extern c and no_mangle
2019-04-27 01:42:58 +03:00
dignifiedquire
ff1d0ca445
we compile again
2019-04-26 20:50:17 +03:00
dignifiedquire
00d08f806f
another round of fixes
2019-04-26 20:01:32 +03:00
dignifiedquire
760e37fb39
reduce code duplication (round 1)
2019-04-26 18:45:30 +03:00
dignifiedquire
0e3b761147
reduce code duplication
2019-04-26 14:43:01 +03:00
dignifiedquire
ff99e19972
inital commit
2019-04-26 11:57:23 +03:00