Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 2833959

Browse files
committed
Fix recursive reserve call in ProtoGC. Also added global scope operator to all gc_* calls from ProtoGC to clarify that they are the global functions.
1 parent b4e8754 commit 2833959

File tree

1 file changed

+14
-14
lines changed
  • src/gc/impl/proto

1 file changed

+14
-14
lines changed

src/gc/impl/proto/gc.d

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ class ProtoGC : GC
6363

6464
void enable()
6565
{
66-
gc_init_nothrow();
67-
gc_enable();
66+
.gc_init_nothrow();
67+
.gc_enable();
6868
}
6969

7070
void disable()
7171
{
72-
gc_init_nothrow();
73-
gc_disable();
72+
.gc_init_nothrow();
73+
.gc_disable();
7474
}
7575

7676
void collect() nothrow
@@ -102,26 +102,26 @@ class ProtoGC : GC
102102

103103
void* malloc(size_t size, uint bits, const TypeInfo ti) nothrow
104104
{
105-
gc_init_nothrow();
106-
return gc_malloc(size, bits, ti);
105+
.gc_init_nothrow();
106+
return .gc_malloc(size, bits, ti);
107107
}
108108

109109
BlkInfo qalloc(size_t size, uint bits, const TypeInfo ti) nothrow
110110
{
111-
gc_init_nothrow();
112-
return gc_qalloc(size, bits, ti);
111+
.gc_init_nothrow();
112+
return .gc_qalloc(size, bits, ti);
113113
}
114114

115115
void* calloc(size_t size, uint bits, const TypeInfo ti) nothrow
116116
{
117-
gc_init_nothrow();
118-
return gc_calloc(size, bits, ti);
117+
.gc_init_nothrow();
118+
return .gc_calloc(size, bits, ti);
119119
}
120120

121121
void* realloc(void* p, size_t size, uint bits, const TypeInfo ti) nothrow
122122
{
123-
gc_init_nothrow();
124-
return gc_realloc(p, size, bits, ti);
123+
.gc_init_nothrow();
124+
return .gc_realloc(p, size, bits, ti);
125125
}
126126

127127
size_t extend(void* p, size_t minsize, size_t maxsize, const TypeInfo ti) nothrow
@@ -131,8 +131,8 @@ class ProtoGC : GC
131131

132132
size_t reserve(size_t size) nothrow
133133
{
134-
gc_init_nothrow();
135-
return reserve(size);
134+
.gc_init_nothrow();
135+
return .gc_reserve(size);
136136
}
137137

138138
void free(void* p) nothrow @nogc

0 commit comments

Comments
 (0)