[vala/staging] posix: Bind some essential memory allocation functions



commit 3b7082a34fe17be82c981f626754c1db283f8dda
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Oct 21 15:19:09 2019 +0200

    posix: Bind some essential memory allocation functions

 vapi/posix.vapi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/vapi/posix.vapi b/vapi/posix.vapi
index eb385bb70..63eab169e 100644
--- a/vapi/posix.vapi
+++ b/vapi/posix.vapi
@@ -1692,6 +1692,18 @@ namespace Posix {
        [CCode (cheader_filename = "stdlib.h")]
        public const int EXIT_SUCCESS;
 
+       /* Memory Allocation */
+       [CCode (cheader_filename = "stdlib.h")]
+       public void* malloc (size_t size);
+       [CCode (cheader_filename = "stdlib.h")]
+       public void* calloc (size_t nmemb, size_t size);
+       [CCode (cheader_filename = "stdlib.h")]
+       public void* realloc (void* ptr, size_t size);
+       [CCode (cheader_filename = "stdlib.h", feature_test_macro = "_GNU_SOURCE")]
+       public void* reallocarray (void* ptr, size_t nmemb, size_t size);
+       [CCode (cheader_filename = "stdlib.h")]
+       public void free (void* ptr);
+
        [CCode (cheader_filename = "string.h")]
        public void* memccpy (void* s1, void* s2, int c, size_t n);
        [CCode (cheader_filename = "string.h")]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]