summaryrefslogtreecommitdiffstats
path: root/FunctionBar.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2006-07-11 06:13:32 +0000
committerHisham Muhammad <hisham@gobolinux.org>2006-07-11 06:13:32 +0000
commit5d48ab8c28925f892e8e7f432f7d2b78c86e95c5 (patch)
tree13a209d132be00e28d24f9ce750a873055cfbd98 /FunctionBar.c
parent4c41e78bbfe34c67db16bbce8e0241ba583e8572 (diff)
Performance improvement hackathon: improve process comparison routines,
disable useless code in release builds such as runtime type-checking on dynamic data structures and process fields that are not being computed, faster(?) method for verifying the process owner (still need to ensure correctness), don't destroy and create process objects for hidden kernel threads over and over. Phew. I shouldn't be doing all this today, but I could not resist.
Diffstat (limited to 'FunctionBar.c')
-rw-r--r--FunctionBar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/FunctionBar.c b/FunctionBar.c
index 7764136c..1140267b 100644
--- a/FunctionBar.c
+++ b/FunctionBar.c
@@ -30,7 +30,11 @@ typedef struct FunctionBar_ {
}*/
+#ifdef DEBUG
char* FUNCTIONBAR_CLASS = "FunctionBar";
+#else
+#define FUNCTIONBAR_CLASS NULL
+#endif
static char* FunctionBar_FKeys[10] = {"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10"};
@@ -40,7 +44,7 @@ static int FunctionBar_FEvents[10] = {KEY_F(1), KEY_F(2), KEY_F(3), KEY_F(4), KE
FunctionBar* FunctionBar_new(int size, char** functions, char** keys, int* events) {
FunctionBar* this = malloc(sizeof(FunctionBar));
- ((Object*) this)->class = FUNCTIONBAR_CLASS;
+ Object_setClass(this, FUNCTIONBAR_CLASS);
((Object*) this)->delete = FunctionBar_delete;
this->functions = functions;
this->size = size;

© 2014-2024 Faster IT GmbH | imprint | privacy policy