[Bf-blender-cvs] [6a53fd5] depsgraph_refactor: Revert "Depsgraph: Rename SPaceType->new to SpaceType->alloc"

Sergey Sharybin noreply at git.blender.org
Mon May 11 16:54:08 CEST 2015


Commit: 6a53fd55480e43435a91f6a3ce86205865ed2641
Author: Sergey Sharybin
Date:   Mon May 11 19:53:21 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB6a53fd55480e43435a91f6a3ce86205865ed2641

Revert "Depsgraph: Rename SPaceType->new to SpaceType->alloc"

Use alternative and less intrusive approach for dealing with
"new" keyword.

This reverts commit c13455e3328c60fae2deecd7a9d8f0d827715f32.

===================================================================

M	source/blender/blenkernel/BKE_screen.h
M	source/blender/depsgraph/intern/depsgraph_tag.cpp
M	source/blender/editors/screen/area.c
M	source/blender/editors/space_action/space_action.c
M	source/blender/editors/space_api/spacetypes.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/editors/space_clip/space_clip.c
M	source/blender/editors/space_console/space_console.c
M	source/blender/editors/space_file/space_file.c
M	source/blender/editors/space_graph/space_graph.c
M	source/blender/editors/space_image/space_image.c
M	source/blender/editors/space_info/space_info.c
M	source/blender/editors/space_logic/space_logic.c
M	source/blender/editors/space_nla/space_nla.c
M	source/blender/editors/space_node/space_node.c
M	source/blender/editors/space_outliner/space_outliner.c
M	source/blender/editors/space_script/space_script.c
M	source/blender/editors/space_sequencer/space_sequencer.c
M	source/blender/editors/space_text/space_text.c
M	source/blender/editors/space_time/space_time.c
M	source/blender/editors/space_userpref/space_userpref.c
M	source/blender/editors/space_view3d/space_view3d.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 9476431..c584051 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -71,7 +71,7 @@ typedef struct SpaceType {
 	int iconid;                                 /* icon lookup for menus */
 	
 	/* initial allocation, after this WM will call init() too */
-	struct SpaceLink    *(*alloc)(const struct bContext *C);
+	struct SpaceLink    *(*new)(const struct bContext *C);
 	/* not free spacelink itself */
 	void (*free)(struct SpaceLink *);
 	
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cpp b/source/blender/depsgraph/intern/depsgraph_tag.cpp
index 91aa900..2f8cdfc 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cpp
@@ -41,7 +41,10 @@ extern "C" {
 #include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_node.h"
+
+#define new new_
 #include "BKE_screen.h"
+#undef new
 
 #include "DEG_depsgraph.h"
 } /* extern "C" */
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 74130cb..3a4034d 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1642,7 +1642,7 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type)
 		else {
 			/* new space */
 			if (st) {
-				sl = st->alloc(C);
+				sl = st->new(C);
 				BLI_addhead(&sa->spacedata, sl);
 				
 				/* swap regions */
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index fd6bd7f..5d0b34a 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -531,7 +531,7 @@ void ED_spacetype_action(void)
 	st->spaceid = SPACE_ACTION;
 	strncpy(st->name, "Action", BKE_ST_MAXNAME);
 	
-	st->alloc = action_new;
+	st->new = action_new;
 	st->free = action_free;
 	st->init = action_init;
 	st->duplicate = action_duplicate;
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 6dc45b4..01f0d1a 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -306,7 +306,7 @@ void ED_spacetype_xxx(void)
 	
 	st.spaceid = SPACE_VIEW3D;
 	
-	st.alloc = xxx_new;
+	st.new = xxx_new;
 	st.free = xxx_free;
 	st.init = xxx_init;
 	st.duplicate = xxx_duplicate;
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 1e073bf..a778df4 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -396,7 +396,7 @@ void ED_spacetype_buttons(void)
 	st->spaceid = SPACE_BUTS;
 	strncpy(st->name, "Buttons", BKE_ST_MAXNAME);
 	
-	st->alloc = buttons_new;
+	st->new = buttons_new;
 	st->free = buttons_free;
 	st->init = buttons_init;
 	st->duplicate = buttons_duplicate;
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 992958b..5ba82f7 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1521,7 +1521,7 @@ void ED_spacetype_clip(void)
 	st->spaceid = SPACE_CLIP;
 	strncpy(st->name, "Clip", BKE_ST_MAXNAME);
 
-	st->alloc = clip_new;
+	st->new = clip_new;
 	st->free = clip_free;
 	st->init = clip_init;
 	st->duplicate = clip_duplicate;
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index d19408d..a592f35 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -395,7 +395,7 @@ void ED_spacetype_console(void)
 	st->spaceid = SPACE_CONSOLE;
 	strncpy(st->name, "Console", BKE_ST_MAXNAME);
 	
-	st->alloc = console_new;
+	st->new = console_new;
 	st->free = console_free;
 	st->init = console_init;
 	st->duplicate = console_duplicate;
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index fad5cdb..782b318 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -605,7 +605,7 @@ void ED_spacetype_file(void)
 	st->spaceid = SPACE_FILE;
 	strncpy(st->name, "File", BKE_ST_MAXNAME);
 	
-	st->alloc = file_new;
+	st->new = file_new;
 	st->free = file_free;
 	st->init = file_init;
 	st->exit = file_exit;
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index e38fb90..ad6f3ff 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -620,7 +620,7 @@ void ED_spacetype_ipo(void)
 	st->spaceid = SPACE_IPO;
 	strncpy(st->name, "Graph", BKE_ST_MAXNAME);
 	
-	st->alloc = graph_new;
+	st->new = graph_new;
 	st->free = graph_free;
 	st->init = graph_init;
 	st->duplicate = graph_duplicate;
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 3d185c3..a9a5e60 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -990,7 +990,7 @@ void ED_spacetype_image(void)
 	st->spaceid = SPACE_IMAGE;
 	strncpy(st->name, "Image", BKE_ST_MAXNAME);
 	
-	st->alloc = image_new;
+	st->new = image_new;
 	st->free = image_free;
 	st->init = image_init;
 	st->duplicate = image_duplicate;
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 5a2c110..befe8c0 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -405,7 +405,7 @@ void ED_spacetype_info(void)
 	st->spaceid = SPACE_INFO;
 	strncpy(st->name, "Info", BKE_ST_MAXNAME);
 	
-	st->alloc = info_new;
+	st->new = info_new;
 	st->free = info_free;
 	st->init = info_init;
 	st->duplicate = info_duplicate;
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index 0d88b68..733cac7 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -309,7 +309,7 @@ void ED_spacetype_logic(void)
 	st->spaceid = SPACE_LOGIC;
 	strncpy(st->name, "Logic", BKE_ST_MAXNAME);
 	
-	st->alloc = logic_new;
+	st->new = logic_new;
 	st->free = logic_free;
 	st->init = logic_init;
 	st->duplicate = logic_duplicate;
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 0c62a7c..ec58452 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -510,7 +510,7 @@ void ED_spacetype_nla(void)
 	st->spaceid = SPACE_NLA;
 	strncpy(st->name, "NLA", BKE_ST_MAXNAME);
 	
-	st->alloc = nla_new;
+	st->new = nla_new;
 	st->free = nla_free;
 	st->init = nla_init;
 	st->duplicate = nla_duplicate;
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index da672ae..de90c41 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -830,7 +830,7 @@ void ED_spacetype_node(void)
 	st->spaceid = SPACE_NODE;
 	strncpy(st->name, "Node", BKE_ST_MAXNAME);
 
-	st->alloc = node_new;
+	st->new = node_new;
 	st->free = node_free;
 	st->init = node_init;
 	st->duplicate = node_duplicate;
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index b20ce06..7b1ec17 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -495,7 +495,7 @@ void ED_spacetype_outliner(void)
 	st->spaceid = SPACE_OUTLINER;
 	strncpy(st->name, "Outliner", BKE_ST_MAXNAME);
 	
-	st->alloc = outliner_new;
+	st->new = outliner_new;
 	st->free = outliner_free;
 	st->init = outliner_init;
 	st->duplicate = outliner_duplicate;
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index 7f12e1f..759dcd3 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -192,7 +192,7 @@ void ED_spacetype_script(void)
 	st->spaceid = SPACE_SCRIPT;
 	strncpy(st->name, "Script", BKE_ST_MAXNAME);
 	
-	st->alloc = script_new;
+	st->new = script_new;
 	st->free = script_free;
 	st->init = script_init;
 	st->duplicate = script_duplicate;
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 91da97c..769718e 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -698,7 +698,7 @@ void ED_spacetype_sequencer(void)
 	st->spaceid = SPACE_SEQ;
 	strncpy(st->name, "Sequencer", BKE_ST_MAXNAME);
 
-	st->alloc = sequencer_new;
+	st->new = sequencer_new;
 	st->free = sequencer_free;
 	st->init = sequencer_init;
 	st->duplicate = sequencer_duplicate;
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index e4647db..d890b9f 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -565,7 +565,7 @@ void ED_spacetype_text(void)
 	st->spaceid = SPACE_TEXT;
 	strncpy(st->name, "Text", BKE_ST_MAXNAME);
 	
-	st->alloc = text_new;
+	st->new = text_new;
 	st->free = text_free;
 	st->init = text_init;
 	st->duplicate = text_duplicate;
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index fc1c0e9..91a0970 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -719,7 +719,7 @@ void ED_spacetype_time(void)
 	st->spaceid = SPACE_TIME;
 	strncpy(st->name, "Timeline", BKE_ST_MAXNAME);
 	
-	st->alloc = time_new;
+	st->new = time_new;
 	st->free = time_free;
 	st->init = time_init;
 	st->duplicate = time_duplicate;
diff --git a/sou

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list