Add the MATRIX_API_CALLBACK cast macro
This commit is contained in:
parent
2f366ee30d
commit
530ed8cb8d
@ -236,6 +236,7 @@ matrix_presence_event_get_type
|
||||
<TITLE>MatrixAPI</TITLE>
|
||||
MatrixAPIInterface
|
||||
MatrixAPICallback
|
||||
MATRIX_API_CALLBACK
|
||||
MATRIX_API_CALLBACK_PROTO
|
||||
|
||||
<SUBSECTION>
|
||||
|
@ -120,6 +120,13 @@
|
||||
* @raw_content will be set.
|
||||
*/
|
||||
|
||||
/**
|
||||
* MATRIX_API_CALLBACK:
|
||||
* @f: a function pointer
|
||||
*
|
||||
* Cast a function pointer to a #MatrixAPICallback.
|
||||
*/
|
||||
|
||||
/**
|
||||
* MATRIX_API_CALLBACK_PROTO:
|
||||
* @name: the name of the function
|
||||
|
@ -41,6 +41,8 @@ typedef void (*MatrixAPICallback)(MatrixAPI *api,
|
||||
gpointer user_data,
|
||||
GError *err);
|
||||
|
||||
#define MATRIX_API_CALLBACK(f) ((MatrixAPICallback) (f)
|
||||
|
||||
#define MATRIX_API_CALLBACK_PROTO(name) static void \
|
||||
name (MatrixAPI *api, \
|
||||
const gchar *content_type, \
|
||||
|
Loading…
Reference in New Issue
Block a user