diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-06-13 22:08:14 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-06-13 22:08:14 +0000 |
commit | be4a8828360b3607414c3ebfd836494e6490267d (patch) | |
tree | 765c44df62326769c1356483f79f5d300ddab9b3 /src/pulsecore/msgobject.h | |
parent | 69115687ad1604ddfa9fa7cd86eb286e6bb5ea9a (diff) |
A lot of more work to get the lock-free stuff in place
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1474 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/msgobject.h')
-rw-r--r-- | src/pulsecore/msgobject.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pulsecore/msgobject.h b/src/pulsecore/msgobject.h index 317ebd20..65761aea 100644 --- a/src/pulsecore/msgobject.h +++ b/src/pulsecore/msgobject.h @@ -40,12 +40,14 @@ struct pa_msgobject { int (*process_msg)(pa_msgobject *o, int code, void *userdata, pa_memchunk *chunk); }; -pa_msgobject *pa_msgobject_new_internal(size_t size, const char *type_name); +pa_msgobject *pa_msgobject_new_internal(size_t size, const char *type_name, int (*check_type)(pa_object *o, const char *type_name)); -#define pa_msgobject_new(type) ((type*) pa_msgobject_new_internal(sizeof(type), #type)) +int pa_msgobject_check_type(pa_object *o, const char *type); + +#define pa_msgobject_new(type, check_type) ((type*) pa_msgobject_new_internal(sizeof(type), #type, check_type)) #define pa_msgobject_free ((void (*) (pa_msgobject* o)) pa_object_free) -#define PA_MSGOBJECT(o) ((pa_msgobject*) (o)) +#define PA_MSGOBJECT(o) pa_msgobject_cast(o) PA_DECLARE_CLASS(pa_msgobject); |