Pārlūkot izejas kodu

Added old allot/forget calls for backwards compatibility.

tags/v0.9.3
Michael Brown 19 gadus atpakaļ
vecāks
revīzija
94d512b979
1 mainītis faili ar 20 papildinājumiem un 0 dzēšanām
  1. 20
    0
      src/include/heap.h

+ 20
- 0
src/include/heap.h Parādīt failu

@@ -59,4 +59,24 @@ static inline void * erealloc ( void *ptr, size_t size, unsigned int align ) {
59 59
 	return emalloc ( size, align );
60 60
 }
61 61
 
62
+/*
63
+ * Legacy API calls
64
+ *
65
+ */
66
+static inline void * allot ( size_t size ) {
67
+	return emalloc ( size, sizeof ( void * ) );
68
+}
69
+
70
+static inline void forget ( void *ptr ) {
71
+	efree ( ptr );
72
+}
73
+
74
+static inline void * allot2 ( size_t size, uint32_t mask ) {
75
+	return emalloc ( size, mask + 1 );
76
+}
77
+
78
+static inline void forget2 ( void *ptr ) {
79
+	efree ( ptr );
80
+}
81
+
62 82
 #endif /* HEAP_H */

Notiek ielāde…
Atcelt
Saglabāt