olm_account_last_error and olm_clear_account should take an Account not a Session

This commit is contained in:
Mark Haines 2015-07-15 13:24:26 +01:00
parent c965a0e619
commit 137aa31e95
2 changed files with 4 additions and 4 deletions

View file

@ -52,7 +52,7 @@ size_t olm_error();
/** A null terminated string describing the most recent error to happen to an /** A null terminated string describing the most recent error to happen to an
* account */ * account */
const char * olm_account_last_error( const char * olm_account_last_error(
OlmSession * account OlmAccount * account
); );
/** A null terminated string describing the most recent error to happen to a /** A null terminated string describing the most recent error to happen to a
@ -63,7 +63,7 @@ const char * olm_session_last_error(
/** Clears the memory used to back this account */ /** Clears the memory used to back this account */
size_t olm_clear_account( size_t olm_clear_account(
OlmSession * account OlmAccount * account
); );
/** Clears the memory used to back this session */ /** Clears the memory used to back this session */

View file

@ -178,7 +178,7 @@ size_t olm_error() {
const char * olm_account_last_error( const char * olm_account_last_error(
OlmSession * account OlmAccount * account
) { ) {
unsigned error = unsigned(from_c(account)->last_error); unsigned error = unsigned(from_c(account)->last_error);
if (error < sizeof(ERRORS)) { if (error < sizeof(ERRORS)) {
@ -228,7 +228,7 @@ OlmSession * olm_session(
size_t olm_clear_account( size_t olm_clear_account(
OlmSession * account OlmAccount * account
) { ) {
/* Clear the memory backing the account */ /* Clear the memory backing the account */
olm::unset(account, sizeof(olm::Account)); olm::unset(account, sizeof(olm::Account));