Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit f315c93

Browse files
thatguystonexzyfer
authored andcommitted
Inline out_of_memory macro
1 parent 1da6264 commit f315c93

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
@@ -34,8 +34,10 @@ extern "C" {
3434
void* ADDCALL sass_alloc_memory(size_t size)
3535
{
3636
void* ptr = malloc(size);
37-
if (ptr == NULL)
38-
out_of_memory();
37+
if (ptr == NULL) {
38+
std::cerr << "Out of memory.\n";
39+
exit(EXIT_FAILURE);
40+
}
3941
return ptr;
4042
}
4143

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)