History

Remove fallback defines for NULL

No actual (supported) compiler lacks a definition for NULL, and it is mandated to be present in stddef.h according to the C89 standard.

Martin Storsjö committed 12 years ago

Commit f252acf1 parent 33a12092 files · +2 −10Browse files

Unified · Split

2 files
  1. codec/common/typedefs.h +1 −4
  2. codec/processing/src/common/typedef.h +1 −6
codec/common/typedefs.h+1−4
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #define WELS_TYPE_DEFINES_H__
3636
3737 #include <limits.h>
38+#include <stddef.h>
3839
3940 ////////////////////////////////////////////////////////////////////////////
4041 // NOTICE : ALL internal implement MUST use the data type defined as below
@@ -67,10 +68,6 @@ typedef float real32_t; · 26 unmodified lines
6768 #endif//EPSN
6869 #define EPSN (0.000001f) // (1e-6) // desired float precision
6970
70−#ifndef NULL
71−#define NULL 0
72−#endif
73−
7471 typedef bool bool_t;
7572 typedef int32_t BOOL_T;
7673
codec/processing/src/common/typedef.h+1−6
@@ -50,9 +50,8 @@ · 49 unmodified lines
5050 #define WELSVP_NAMESPACE_BEGIN namespace nsWelsVP {
5151 #define WELSVP_NAMESPACE_END }
5252
53−#ifdef _MSC_VER
5453 #include <stddef.h>
55−#else
54+#ifndef _MSC_VER
5655 #include <stdint.h>
5756 #endif
5857
@@ -82,10 +81,6 @@ typedef float float_t ; · 23 unmodified lines
8281 typedef double double_t ;
8382 #endif
8483
85−#ifndef NULL
86−#define NULL 0
87−#endif
88−
8984 enum {
9085 FALSE = 0,
9186 TRUE = !FALSE

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t