[vala] Fix use of memory profiler in multithreaded applications
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Fix use of memory profiler in multithreaded applications
- Date: Fri, 12 Mar 2010 14:52:25 +0000 (UTC)
commit 67e44ed8b41fd9e95d17d2c6f4e54a95101f828c
Author: Jörn Magens <interflug1 gmx net>
Date: Fri Mar 12 15:50:13 2010 +0100
Fix use of memory profiler in multithreaded applications
Fixes bug 607973.
codegen/valaccodemethodmodule.vala | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index f7b30ae..10dd7d2 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -755,13 +755,6 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
var main_block = new CCodeBlock ();
if (context.profile == Profile.GOBJECT) {
- if (context.thread) {
- var thread_init_call = new CCodeFunctionCall (new CCodeIdentifier ("g_thread_init"));
- thread_init_call.line = cmain.line;
- thread_init_call.add_argument (new CCodeConstant ("NULL"));
- main_block.add_statement (new CCodeExpressionStatement (thread_init_call));
- }
-
if (context.mem_profiler) {
var mem_profiler_init_call = new CCodeFunctionCall (new CCodeIdentifier ("g_mem_set_vtable"));
mem_profiler_init_call.line = cmain.line;
@@ -769,6 +762,13 @@ internal class Vala.CCodeMethodModule : CCodeStructModule {
main_block.add_statement (new CCodeExpressionStatement (mem_profiler_init_call));
}
+ if (context.thread) {
+ var thread_init_call = new CCodeFunctionCall (new CCodeIdentifier ("g_thread_init"));
+ thread_init_call.line = cmain.line;
+ thread_init_call.add_argument (new CCodeConstant ("NULL"));
+ main_block.add_statement (new CCodeExpressionStatement (thread_init_call));
+ }
+
var type_init_call = new CCodeExpressionStatement (new CCodeFunctionCall (new CCodeIdentifier ("g_type_init")));
type_init_call.line = cmain.line;
main_block.add_statement (type_init_call);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]