Mono/C#: Initial exporter support for AOT compilation

This commit is contained in:
Ignacio Etcheverry 2019-11-13 20:12:36 +01:00
parent de7c2ad21b
commit 2b67924a0b
16 changed files with 616 additions and 173 deletions

View file

@ -216,6 +216,25 @@ String str_format(const char *p_format, ...) {
#endif
String str_format(const char *p_format, va_list p_list) {
char *buffer = str_format_new(p_format, p_list);
String res(buffer);
memdelete_arr(buffer);
return res;
}
char *str_format_new(const char *p_format, ...) {
va_list list;
va_start(list, p_format);
char *res = str_format_new(p_format, list);
va_end(list);
return res;
}
char *str_format_new(const char *p_format, va_list p_list) {
va_list list;
va_copy(list, p_list);
@ -230,8 +249,5 @@ String str_format(const char *p_format, va_list p_list) {
gd_vsnprintf(buffer, len, p_format, list);
va_end(list);
String res(buffer);
memdelete_arr(buffer);
return res;
return buffer;
}