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



commit 81ec697bc55c99dad2ca1229df6844810080151a
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 3b3cd68b8..952fc5de5 100644
--- a/vapi/posix.vapi
+++ b/vapi/posix.vapi
@@ -1417,6 +1417,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]