summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/msgobject.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-07-31 22:44:53 +0000
committerLennart Poettering <lennart@poettering.net>2007-07-31 22:44:53 +0000
commit0defdfb5607889c35fdefff4af31eb8b0ae0cbcf (patch)
tree8a8a93281aa32baa815185de5b2cb869f30376bf /src/pulsecore/msgobject.c
parenta82505e72f6680258b8162b846c98c64bea45c37 (diff)
A lot of updates, all necessary to get the native protocol ported:
* add an int64_t argument to pa_asyncmsgq because it is very difficult to pass 64 values otherwise * simplify subclassing in pa_object * s/drop/unlink/ at some places * port the native protocol to the lock-free core (not tested, compiles fine) * move synchronisation of playback streams into pa_sink_input * add "start_corked" field to pa_sink_input_new_data * allow casting of NULL values in pa_object git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1562 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/msgobject.c')
-rw-r--r--src/pulsecore/msgobject.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/pulsecore/msgobject.c b/src/pulsecore/msgobject.c
index 6db630c5..f54e69f2 100644
--- a/src/pulsecore/msgobject.c
+++ b/src/pulsecore/msgobject.c
@@ -28,15 +28,22 @@
#include "msgobject.h"
-PA_DEFINE_CHECK_TYPE(pa_msgobject, pa_msgobject_check_type, pa_object_check_type);
+PA_DEFINE_CHECK_TYPE(pa_msgobject, pa_object);
-pa_msgobject *pa_msgobject_new_internal(size_t size, const char *type_name, int (*check_type)(pa_object *o, const char *type_name)) {
+pa_msgobject *pa_msgobject_new_internal(size_t size, const char *type_name, int (*check_type)(const char *type_name)) {
pa_msgobject *o;
pa_assert(size > sizeof(pa_msgobject));
pa_assert(type_name);
- o = PA_MSGOBJECT(pa_object_new_internal(size, type_name, check_type ? check_type : pa_msgobject_check_type));
+ if (!check_type)
+ check_type = pa_msgobject_check_type;
+
+ pa_assert(check_type(type_name));
+ pa_assert(check_type("pa_object"));
+ pa_assert(check_type("pa_msgobject"));
+
+ o = PA_MSGOBJECT(pa_object_new_internal(size, type_name, check_type));
o->process_msg = NULL;
return o;
}