Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strengthen the note about ABI compatibility in tox.h. #330

Merged
merged 1 commit into from
Dec 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions toxcore/tox.api.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,19 +428,17 @@ typedef void log_cb(LOG_LEVEL level, string file, uint32_t line, string func, st

static class options {
/**
* This struct contains all the startup options for Tox. You can either
* allocate this object yourself, and pass it to $default, or call $new to get
* a new default options object.
* This struct contains all the startup options for Tox. You must $new to
* allocate an object of this type.
*
* If you allocate it yourself, be aware that your binary will rely on the
* memory layout of this struct. In particular, if additional fields are added
* in future versions of the API, code that allocates it itself will become
* incompatible.
* WARNING: Although this struct happens to be visible in the API, it is
* effectively private. Do not allocate this yourself or access members
* directly, as it *will* break binary compatibility frequently.
*
* @deprecated The memory layout of this struct (size, alignment, and field
* order) is not part of the ABI. To remain compatible, prefer to use $new to
* allocate the object and accessor functions to set the members. The struct
* will become opaque (i.e. the definition will become private) in v0.1.0.
* will become opaque (i.e. the definition will become private) in v0.2.0.
*/
struct this [get, set] {
/**
Expand Down
14 changes: 6 additions & 8 deletions toxcore/tox.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,19 +477,17 @@ typedef void tox_log_cb(Tox *tox, TOX_LOG_LEVEL level, const char *file, uint32_


/**
* This struct contains all the startup options for Tox. You can either
* allocate this object yourself, and pass it to tox_options_default, or call tox_options_new to get
* a new default options object.
* This struct contains all the startup options for Tox. You must tox_options_new to
* allocate an object of this type.
*
* If you allocate it yourself, be aware that your binary will rely on the
* memory layout of this struct. In particular, if additional fields are added
* in future versions of the API, code that allocates it itself will become
* incompatible.
* WARNING: Although this struct happens to be visible in the API, it is
* effectively private. Do not allocate this yourself or access members
* directly, as it *will* break binary compatibility frequently.
*
* @deprecated The memory layout of this struct (size, alignment, and field
* order) is not part of the ABI. To remain compatible, prefer to use tox_options_new to
* allocate the object and accessor functions to set the members. The struct
* will become opaque (i.e. the definition will become private) in v0.1.0.
* will become opaque (i.e. the definition will become private) in v0.2.0.
*/
struct Tox_Options {

Expand Down