Skip to content

Commit 5539920

Browse files
thatguystonexzyfer
authored andcommitted
Inline out_of_memory macro
1 parent fd989f6 commit 5539920

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/sass.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ extern "C" {
3333
void* ADDCALL sass_alloc_memory(size_t size)
3434
{
3535
void* ptr = malloc(size);
36-
if (ptr == NULL)
37-
out_of_memory();
36+
if (ptr == NULL) {
37+
std::cerr << "Out of memory.\n";
38+
exit(EXIT_FAILURE);
39+
}
3840
return ptr;
3941
}
4042

src/util.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212

1313
namespace Sass {
1414

15-
#define out_of_memory() do { \
16-
std::cerr << "Out of memory.\n"; \
17-
exit(EXIT_FAILURE); \
18-
} while (0)
19-
2015
double round(double val, size_t precision = 0);
2116
double sass_strtod(const char* str);
2217
const char* safe_str(const char *, const char* = "");

0 commit comments

Comments
 (0)