diff options
| author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-04-25 15:45:12 +0200 |
|---|---|---|
| committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-04-25 20:34:28 +0200 |
| commit | c20a3823a2eafdb40a9db3519e503269689bac14 (patch) | |
| tree | 72bd6a9fabb451a5af0939c6ede9e9496c9b3394 /modules/mono/utils/string_utils.h | |
| parent | bf1fe11143241446dc0d8b841f46ac5b9ff4e574 (diff) | |
| download | redot-engine-c20a3823a2eafdb40a9db3519e503269689bac14.tar.gz | |
C# bindings generator cleanup
- Normal log messages are no longer warnings.
- BindingsGenerator is no longer a singleton.
- Added a log function.
Diffstat (limited to 'modules/mono/utils/string_utils.h')
| -rw-r--r-- | modules/mono/utils/string_utils.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/mono/utils/string_utils.h b/modules/mono/utils/string_utils.h index 61765ccfd8..565b9bb644 100644 --- a/modules/mono/utils/string_utils.h +++ b/modules/mono/utils/string_utils.h @@ -34,6 +34,8 @@ #include "core/ustring.h" #include "core/variant.h" +#include <stdarg.h> + String sformat(const String &p_text, const Variant &p1 = Variant(), const Variant &p2 = Variant(), const Variant &p3 = Variant(), const Variant &p4 = Variant(), const Variant &p5 = Variant()); #ifdef TOOLS_ENABLED @@ -44,4 +46,15 @@ String escape_csharp_keyword(const String &p_name); Error read_all_file_utf8(const String &p_path, String &r_content); +#if defined(__GNUC__) +#define _PRINTF_FORMAT_ATTRIBUTE_1_0 __attribute__((format(printf, 1, 0))) +#define _PRINTF_FORMAT_ATTRIBUTE_1_2 __attribute__((format(printf, 1, 2))) +#else +#define _PRINTF_FORMAT_ATTRIBUTE_1_0 +#define _PRINTF_FORMAT_ATTRIBUTE_1_2 +#endif + +String str_format(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_1_2; +String str_format(const char *p_format, va_list p_list) _PRINTF_FORMAT_ATTRIBUTE_1_0; + #endif // STRING_FORMAT_H |
