-Noteworthy changes in version 1.x.y (unreleased)
+Noteworthy changes in version 1.1.1 (unreleased)
------------------------------------------------
* Reading signature notations and policy URLs on key signatures is
gpgme_key_sig_t structure. This has to be enabled with the keylist
mode flag GPGME_KEYLIST_MODE_SIG_NOTATIONS.
- * Interface changes relative to the 1.0.3 release:
+ * A new gpgme_free() function solves the problem of using different
+ allocators in a single program. This function should now be used
+ instead calling free() to release the buffer returned by
+ gpgme_data_release_and_get_mem. It is recommended that you always
+ do this, but it is only necessary on certain platforms, so backwards
+ compatibility is provided. In other words: If free() worked for
+ you before, it will keep working.
+
+ * Interface changes relative to the 1.1.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_key_sig_t EXTENDED: New field notations.
GPGME_KEYLIST_MODE_SIG_NOTATIONS NEW
+gpgme_free NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+2005-10-06 Marcus Brinkmann <marcus@g10code.de>
+
+ * gpgme.texi (Destroying Data Buffers): Document gpgme_free.
+
2005-10-02 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Management): Add the new member notations of
@code{gpgme_data_release}, except that it returns the data buffer and
its length that was provided by the object.
-The user has to release the buffer with @code{free}. In case the user
-provided the data buffer in non-copy mode, a copy will be made for
-this purpose.
+The user has to release the buffer with @code{gpgme_free}. In case
+the user provided the data buffer in non-copy mode, a copy will be
+made for this purpose.
In case an error returns, or there is no suitable data buffer that can
be returned to the user, the function will return @code{NULL}.
@end deftypefun
+@deftypefun void gpgme_free (@w{void *@var{buffer}})
+The function @code{gpgme_free} releases the memory returned by
+@code{gpgme_data_release_and_get_mem}. It should be used instead of
+the system libraries @code{free} function in case different allocators
+are used in a single program.
+@end deftypefun
+
+
@node Manipulating Data Buffers
@section Manipulating Data Buffers
@cindex data buffer, manipulation
+2005-10-06 Marcus Brinkmann <marcus@g10code.de>
+
+ * gpgme.h (gpgme_free): New prototype.
+ * data-mem.c (gpgme_free): New function.
+ * libgpgme.vers (GPGME_1.1): Add gpgme_free.
+ * gpgme.def: Add gpgme_free.
+
2005-10-02 Marcus Brinkmann <marcus@g10code.de>
* util.h (_gpgme_decode_percent_string): Add new argument BINARY
};
\f
+/* Create a new data buffer and return it in R_DH. */
gpgme_error_t
gpgme_data_new (gpgme_data_t *dh)
{
}
+/* Destroy the data buffer DH and return a pointer to its content.
+ The memory has be to released with gpgme_free() by the user. It's
+ size is returned in R_LEN. */
char *
gpgme_data_release_and_get_mem (gpgme_data_t dh, size_t *r_len)
{
return str;
}
+
+
+/* Release the memory returned by gpgme_data_release_and_get_mem(). */
+void
+gpgme_free (void *buffer)
+{
+ if (buffer)
+ free (buffer);
+}
+
gpgme_sig_notation_add @118
gpgme_sig_notation_get @119
+ gpgme_free @120
; END
int copy);
/* Destroy the data buffer DH and return a pointer to its content.
- The memory has be to released with free by the user. It's size is
- returned in R_LEN. */
+ The memory has be to released with gpgme_free() by the user. It's
+ size is returned in R_LEN. */
char *gpgme_data_release_and_get_mem (gpgme_data_t dh, size_t *r_len);
+/* Release the memory returned by gpgme_data_release_and_get_mem(). */
+void gpgme_free (void *buffer);
+
gpgme_error_t gpgme_data_new_from_cbs (gpgme_data_t *dh,
gpgme_data_cbs_t cbs,
void *handle);
gpgme_sig_notation_clear;
gpgme_sig_notation_add;
gpgme_sig_notation_get;
+
+ gpgme_free;
};