diff include/datatypes.h @ 12:0cc2555db371

*: make our string functions not stupid strncat() made everything slow! new addition internally: an EDL_header structure to make things not stupid. if we were using C++ it wouldn't really be necessary, but alas :)
author Paper <paper@paper.us.eu.org>
date Wed, 27 Mar 2024 13:38:30 -0400
parents 0c98b46eaf73
children 41b74137e201
line wrap: on
line diff
--- a/include/datatypes.h	Fri Mar 22 20:51:46 2024 -0400
+++ b/include/datatypes.h	Wed Mar 27 13:38:30 2024 -0400
@@ -3,6 +3,7 @@
 
 #include <stddef.h>
 #include "edl.h" /* EDL_media_type_t */
+#include "str.h"
 
 size_t EDL_internal_parse_int(const char* input, size_t offset, size_t length, int* int_return);
 size_t EDL_internal_parse_double(const char* input, size_t offset, size_t length, double* double_return);
@@ -10,9 +11,9 @@
 size_t EDL_internal_parse_media_type(const char* input, size_t offset, size_t length, EDL_media_type_t* media_return);
 size_t EDL_internal_parse_string(const char* input, size_t offset, size_t length, char** string_return);
 
-char* EDL_internal_integer_to_string(int value);
-char* EDL_internal_double_to_string(double value);
-char* EDL_internal_bool_to_string(bool value);
-char* EDL_internal_media_type_to_string(EDL_media_type_t value);
+int EDL_internal_append_integer_to_string(EDL_internal_string* str, int value);
+int EDL_internal_append_double_to_string(EDL_internal_string* str, double value);
+int EDL_internal_append_bool_to_string(EDL_internal_string* str, bool value);
+int EDL_internal_append_media_type_to_string(EDL_internal_string* str, EDL_media_type_t value);
 
 #endif /* __edl__internal__datatypes_h */