diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-12-06 02:29:57 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-12-06 02:29:57 +0100 |
| commit | 5e7ed2f6534bf8d99688e375c56f44f792bdf7bb (patch) | |
| tree | bd59017682dad0a5887faf4b6cfe0bc8389ca9c6 /fluid/nodes/Function_Node.h | |
| parent | b2746ad28693d61cecaa1e9fb57ab93c0050e3d3 (diff) | |
Fluid: fix class prefix user input check.
Diffstat (limited to 'fluid/nodes/Function_Node.h')
| -rw-r--r-- | fluid/nodes/Function_Node.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fluid/nodes/Function_Node.h b/fluid/nodes/Function_Node.h index 56a0046e0..282f33312 100644 --- a/fluid/nodes/Function_Node.h +++ b/fluid/nodes/Function_Node.h @@ -34,6 +34,8 @@ #include <stdarg.h> #include <stdlib.h> +#include <string> + extern class Class_Node *current_class; int has_toplevel_function(const char *rtype, const char *sig); @@ -271,7 +273,7 @@ public: private: const char* subclass_of; char public_; - const char* class_prefix; + std::string prefix_; public: Class_Node(); ~Class_Node(); @@ -298,8 +300,10 @@ public: void visibility(char v) { public_ = v; } // class prefix attribute access - void prefix(const char* p); - const char* prefix() const {return class_prefix;} + /** Set the text between `class` and the class name */ + void prefix(const std::string& p) { prefix_ = p; } + /** Get the text between `class` and the class name */ + std::string prefix() const { return prefix_; } }; #endif // FLUID_NODES_FUNCTION_NODE_H |
