summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-21 21:27:44 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-21 21:27:44 +0200
commit9abc010c930999eed67253f5b83f7c226b1a17f6 (patch)
tree7a60ec4acef9fd7d68dbe97429c6c6d1a5870df8 /src/pulsecore/core.c
parent5317e35543ab208a416cc662e2a6a88899a96704 (diff)
object: speed up type verification by not relying on strcmp()
Instead of using string contents for type identification use the address of a constant string array. This should speed up type verifications a little sind we only need to compare one machine word instead of a full string. Also, this saves a few strings. To make clear that types must be compared via address and not string contents 'type_name' is now called 'type_id'. This also simplifies the macros for declaring and defining public and private subclasses.
Diffstat (limited to 'src/pulsecore/core.c')
-rw-r--r--src/pulsecore/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c
index f5eb8352..f0726453 100644
--- a/src/pulsecore/core.c
+++ b/src/pulsecore/core.c
@@ -47,7 +47,7 @@
#include "core.h"
-static PA_DEFINE_CHECK_TYPE(pa_core, pa_msgobject);
+PA_DEFINE_PUBLIC_CLASS(pa_core, pa_msgobject);
static int core_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk) {
pa_core *c = PA_CORE(o);