[Bf-blender-cvs] [b12daf64cad] functions: separate tuple from tuple-call
Jacques Lucke
noreply at git.blender.org
Mon Jun 24 12:38:08 CEST 2019
Commit: b12daf64cad6d527259584e9e4ef814cc35593b8
Author: Jacques Lucke
Date: Mon Jun 24 09:38:54 2019 +0200
Branches: functions
https://developer.blender.org/rBb12daf64cad6d527259584e9e4ef814cc35593b8
separate tuple from tuple-call
===================================================================
M source/blender/functions/CMakeLists.txt
A source/blender/functions/FN_tuple-c.h
A source/blender/functions/FN_tuple.hpp
M source/blender/functions/FN_tuple_call.hpp
R100 source/blender/functions/backends/tuple_call/cpp_types.cpp source/blender/functions/backends/tuple/cpp_types.cpp
R100 source/blender/functions/backends/tuple_call/cpp_types.hpp source/blender/functions/backends/tuple/cpp_types.hpp
A source/blender/functions/backends/tuple/tuple-c.cpp
A source/blender/functions/backends/tuple/tuple-c.h
R100 source/blender/functions/backends/tuple_call/tuple.cpp source/blender/functions/backends/tuple/tuple.cpp
R100 source/blender/functions/backends/tuple_call/tuple.hpp source/blender/functions/backends/tuple/tuple.hpp
M source/blender/functions/backends/tuple_call/tuple_call-c.cpp
M source/blender/functions/backends/tuple_call/tuple_call-c.h
M source/blender/functions/backends/tuple_call/tuple_call.hpp
M source/blender/functions/functions/ranges.cpp
M source/blender/functions/types/boolean.cpp
M source/blender/functions/types/numeric.cpp
M source/blender/functions/types/numeric_lists.cpp
M source/blender/functions/types/tuple_access-c.h
===================================================================
diff --git a/source/blender/functions/CMakeLists.txt b/source/blender/functions/CMakeLists.txt
index 4d437421457..eb10cab30c0 100644
--- a/source/blender/functions/CMakeLists.txt
+++ b/source/blender/functions/CMakeLists.txt
@@ -51,14 +51,17 @@ set(SRC
core/core-c.h
core/core-c.cpp
- backends/tuple_call/cpp_types.hpp
- backends/tuple_call/cpp_types.cpp
+ backends/tuple/cpp_types.hpp
+ backends/tuple/cpp_types.cpp
+ backends/tuple/tuple.hpp
+ backends/tuple/tuple.cpp
+ backends/tuple/tuple-c.h
+ backends/tuple/tuple-c.cpp
+
backends/tuple_call/tuple_call.hpp
backends/tuple_call/tuple_call.cpp
backends/tuple_call/fgraph_tuple_call.hpp
backends/tuple_call/fgraph_tuple_call.cpp
- backends/tuple_call/tuple.hpp
- backends/tuple_call/tuple.cpp
backends/tuple_call/lazy_to_normal.hpp
backends/tuple_call/lazy_to_normal.cpp
backends/tuple_call/execution_context.hpp
diff --git a/source/blender/functions/FN_tuple-c.h b/source/blender/functions/FN_tuple-c.h
new file mode 100644
index 00000000000..a8b92013e6c
--- /dev/null
+++ b/source/blender/functions/FN_tuple-c.h
@@ -0,0 +1,6 @@
+#ifndef __FUNCTIONS_TUPLE_C_H__
+#define __FUNCTIONS_TUPLE_C_H__
+
+#include "backends/tuple/tuple-c.h"
+
+#endif /* __FUNCTIONS_TUPLE_CALL_C_H__ */
diff --git a/source/blender/functions/FN_tuple.hpp b/source/blender/functions/FN_tuple.hpp
new file mode 100644
index 00000000000..7ae251033e4
--- /dev/null
+++ b/source/blender/functions/FN_tuple.hpp
@@ -0,0 +1,5 @@
+#pragma once
+
+#include "FN_tuple-c.h"
+#include "backends/tuple/cpp_types.hpp"
+#include "backends/tuple/tuple.hpp"
diff --git a/source/blender/functions/FN_tuple_call.hpp b/source/blender/functions/FN_tuple_call.hpp
index 16996a8ac69..4ea15ce2c26 100644
--- a/source/blender/functions/FN_tuple_call.hpp
+++ b/source/blender/functions/FN_tuple_call.hpp
@@ -1,8 +1,6 @@
#pragma once
#include "FN_tuple_call-c.h"
-#include "backends/tuple_call/cpp_types.hpp"
-#include "backends/tuple_call/tuple.hpp"
#include "backends/tuple_call/tuple_call.hpp"
#include "backends/tuple_call/fgraph_tuple_call.hpp"
#include "backends/tuple_call/lazy_to_normal.hpp"
diff --git a/source/blender/functions/backends/tuple_call/cpp_types.cpp b/source/blender/functions/backends/tuple/cpp_types.cpp
similarity index 100%
rename from source/blender/functions/backends/tuple_call/cpp_types.cpp
rename to source/blender/functions/backends/tuple/cpp_types.cpp
diff --git a/source/blender/functions/backends/tuple_call/cpp_types.hpp b/source/blender/functions/backends/tuple/cpp_types.hpp
similarity index 100%
rename from source/blender/functions/backends/tuple_call/cpp_types.hpp
rename to source/blender/functions/backends/tuple/cpp_types.hpp
diff --git a/source/blender/functions/backends/tuple/tuple-c.cpp b/source/blender/functions/backends/tuple/tuple-c.cpp
new file mode 100644
index 00000000000..f75deaafa9e
--- /dev/null
+++ b/source/blender/functions/backends/tuple/tuple-c.cpp
@@ -0,0 +1,11 @@
+#include "FN_tuple.hpp"
+
+void FN_tuple_free(FnTuple tuple_c)
+{
+ delete unwrap(tuple_c);
+}
+
+void fn_tuple_destruct(FnTuple tuple_c)
+{
+ unwrap(tuple_c)->~Tuple();
+}
diff --git a/source/blender/functions/backends/tuple/tuple-c.h b/source/blender/functions/backends/tuple/tuple-c.h
new file mode 100644
index 00000000000..59733bc333c
--- /dev/null
+++ b/source/blender/functions/backends/tuple/tuple-c.h
@@ -0,0 +1,25 @@
+#ifndef __FUNCTIONS_TUPLE_WRAPPER_C_H__
+#define __FUNCTIONS_TUPLE_WRAPPER_C_H__
+
+#include "FN_core-c.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct OpaqueFnTuple *FnTuple;
+
+void FN_tuple_free(FnTuple tuple);
+
+void fn_tuple_destruct(FnTuple tuple);
+
+#ifdef __cplusplus
+}
+
+# include "tuple.hpp"
+
+WRAPPERS(FN::Tuple *, FnTuple);
+
+#endif /* __cplusplus */
+
+#endif /* __FUNCTIONS_TUPLE_WRAPPER_C_H__ */
diff --git a/source/blender/functions/backends/tuple_call/tuple.cpp b/source/blender/functions/backends/tuple/tuple.cpp
similarity index 100%
rename from source/blender/functions/backends/tuple_call/tuple.cpp
rename to source/blender/functions/backends/tuple/tuple.cpp
diff --git a/source/blender/functions/backends/tuple_call/tuple.hpp b/source/blender/functions/backends/tuple/tuple.hpp
similarity index 100%
rename from source/blender/functions/backends/tuple_call/tuple.hpp
rename to source/blender/functions/backends/tuple/tuple.hpp
diff --git a/source/blender/functions/backends/tuple_call/tuple_call-c.cpp b/source/blender/functions/backends/tuple_call/tuple_call-c.cpp
index 684226796d2..8b79409beca 100644
--- a/source/blender/functions/backends/tuple_call/tuple_call-c.cpp
+++ b/source/blender/functions/backends/tuple_call/tuple_call-c.cpp
@@ -39,11 +39,6 @@ FnTuple FN_tuple_for_output(FnTupleCallBody body_c)
return wrap(tuple);
}
-void FN_tuple_free(FnTuple tuple_c)
-{
- delete unwrap(tuple_c);
-}
-
uint fn_tuple_stack_prepare_size(FnTupleCallBody body_c)
{
TupleCallBody *body = unwrap(body_c);
@@ -64,8 +59,3 @@ void fn_tuple_prepare_stack(FnTupleCallBody body_c,
*fn_in_c = wrap((Tuple *)buf_in);
*fn_out_c = wrap((Tuple *)buf_out);
}
-
-void fn_tuple_destruct(FnTuple tuple_c)
-{
- unwrap(tuple_c)->~Tuple();
-}
diff --git a/source/blender/functions/backends/tuple_call/tuple_call-c.h b/source/blender/functions/backends/tuple_call/tuple_call-c.h
index 76b6dedf668..5d58d30c4a9 100644
--- a/source/blender/functions/backends/tuple_call/tuple_call-c.h
+++ b/source/blender/functions/backends/tuple_call/tuple_call-c.h
@@ -2,13 +2,13 @@
#define __FUNCTIONS_TUPLE_CALL_WRAPPER_C_H__
#include "FN_core-c.h"
+#include "FN_tuple-c.h"
#include "BLI_alloca.h"
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct OpaqueFnTuple *FnTuple;
typedef struct OpaqueFnTupleCallBody *FnTupleCallBody;
FnTupleCallBody FN_tuple_call_get(FnFunction fn);
@@ -19,13 +19,9 @@ void FN_tuple_call_invoke(FnTupleCallBody body,
FnTuple FN_tuple_for_input(FnTupleCallBody body);
FnTuple FN_tuple_for_output(FnTupleCallBody body);
-void FN_tuple_free(FnTuple tuple);
-
uint fn_tuple_stack_prepare_size(FnTupleCallBody body);
void fn_tuple_prepare_stack(FnTupleCallBody body, void *buffer, FnTuple *fn_in, FnTuple *fn_out);
-void fn_tuple_destruct(FnTuple tuple);
-
#define FN_TUPLE_CALL_PREPARE_STACK(body, fn_in, fn_out) \
FnTuple fn_in, fn_out; \
void *fn_in##_##fn_out##_buffer = alloca(fn_tuple_stack_prepare_size(body)); \
@@ -46,10 +42,8 @@ void fn_tuple_destruct(FnTuple tuple);
#ifdef __cplusplus
}
-# include "tuple.hpp"
# include "tuple_call.hpp"
-WRAPPERS(FN::Tuple *, FnTuple);
WRAPPERS(FN::TupleCallBody *, FnTupleCallBody);
#endif /* __cplusplus */
diff --git a/source/blender/functions/backends/tuple_call/tuple_call.hpp b/source/blender/functions/backends/tuple_call/tuple_call.hpp
index 9ce96542449..038688ad53a 100644
--- a/source/blender/functions/backends/tuple_call/tuple_call.hpp
+++ b/source/blender/functions/backends/tuple_call/tuple_call.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "tuple.hpp"
+#include "FN_tuple.hpp"
#include "execution_context.hpp"
namespace FN {
diff --git a/source/blender/functions/functions/ranges.cpp b/source/blender/functions/functions/ranges.cpp
index 8dbc3da4894..96c15c701bf 100644
--- a/source/blender/functions/functions/ranges.cpp
+++ b/source/blender/functions/functions/ranges.cpp
@@ -1,6 +1,7 @@
#include "FN_core.hpp"
#include "FN_functions.hpp"
#include "FN_types.hpp"
+#include "FN_tuple_call.hpp"
#include "BLI_lazy_init.hpp"
diff --git a/source/blender/functions/types/boolean.cpp b/source/blender/functions/types/boolean.cpp
index b68496b88f2..528047df37e 100644
--- a/source/blender/functions/types/boolean.cpp
+++ b/source/blender/functions/types/boolean.cpp
@@ -2,7 +2,7 @@
#include "BLI_lazy_init.hpp"
-#include "FN_tuple_call.hpp"
+#include "FN_tuple.hpp"
#include "FN_llvm.hpp"
namespace FN {
diff --git a/source/blender/functions/types/numeric.cpp b/source/blender/functions/types/numeric.cpp
index 3ddb5ee43e9..6ea5452e8ca 100644
--- a/source/blender/functions/types/numeric.cpp
+++ b/source/blender/functions/types/numeric.cpp
@@ -1,7 +1,7 @@
#include "numeric.hpp"
#include "BLI_lazy_init.hpp"
-#include "FN_tuple_call.hpp"
+#include "FN_tuple.hpp"
#include "FN_llvm.hpp"
namespace FN {
diff --git a/source/blender/functions/types/numeric_lists.cpp b/source/blender/functions/types/numeric_lists.cpp
index 9842710fc2b..2a7500d2518 100644
--- a/source/blender/functions/types/numeric_lists.cpp
+++ b/source/blender/functions/types/numeric_lists.cpp
@@ -1,7 +1,7 @@
#include "numeric_lists.hpp"
#include "BLI_lazy_init.hpp"
-#include "FN_tuple_call.hpp"
+#include "FN_tuple.hpp"
#include "FN_llvm.hpp"
namespace FN {
diff --git a/source/blender/functions/types/tuple_access-c.h b/source/blender/functions/types/tuple_access-c.h
index 7324dd480fe..6eeba69958b 100644
--- a/source/blender/functions/types/tuple_access-c.h
+++ b/source/blender/functions/types/tuple_access-c.h
@@ -1,7 +1,7 @@
#ifndef __FUNCTIONS_TYPES_TUPLE_ACCESS_C_H__
#define __FUNCTIONS_TYPES_TUPLE_ACCESS_C_H__
-#include "FN_tuple_call-c.h"
+#include "FN_tuple-c.h"
#include "types-c.h"
#include "BLI_utildefines.h"
More information about the Bf-blender-cvs
mailing list