Skip to content

Commit 8d49009

Browse files
committed
优化define
1 parent 6d220dd commit 8d49009

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

32/base14.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939

4040
//#define DEBUG
4141

42-
#define new malloc
42+
#ifndef new
43+
#define new malloc
44+
#endif
4345

4446
LENDAT* encode(const uint8_t* data, const int32_t len) {
4547
LENDAT* encd = (LENDAT*)new(sizeof(LENDAT));

64/base14.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646

4747
//#define DEBUG
4848

49-
#define new malloc
49+
#ifndef new
50+
#define new malloc
51+
#endif
5052

5153
LENDAT* encode(const uint8_t* data, const int64_t len) {
5254
LENDAT* encd = (LENDAT*)new(sizeof(LENDAT));

0 commit comments

Comments
 (0)