diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2019-04-29 16:56:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-29 16:56:25 +0200 |
| commit | 554c0ea90b4bc3b94d2c9a357d6f9c1db93abfe7 (patch) | |
| tree | 90076d464a839ebdd1cb4485239c5eb3aab4bb34 /modules/mono/utils/string_utils.h | |
| parent | a3617f6ca82f4c8121f75d9d2c342ef5431dd214 (diff) | |
| parent | 3380565e4be4e3decbd0981c3f6a2e54f982c2f2 (diff) | |
| download | redot-engine-554c0ea90b4bc3b94d2c9a357d6f9c1db93abfe7.tar.gz | |
Merge pull request #28423 from neikeq/dont-forget-to-think-a-name-for-this-branch
C#: Deprecate accessor methods and generate correct int and float types
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 |
