OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _JBIG2_OBJECT_H_ | 7 #ifndef _JBIG2_OBJECT_H_ |
8 #define _JBIG2_OBJECT_H_ | 8 #define _JBIG2_OBJECT_H_ |
9 #include "JBig2_Define.h" | 9 #include "JBig2_Define.h" |
10 class CJBig2_Module; | 10 class CJBig2_Module; |
11 #define _JBIG2_NO_EXPECTION_ | 11 #define _JBIG2_NO_EXPECTION_ |
12 class CJBig2_Object | 12 class CJBig2_Object { |
13 { | 13 public: |
14 public: | 14 void* operator new(size_t size, |
| 15 CJBig2_Module* pModule, |
| 16 const FX_CHAR* filename, |
| 17 int line); |
15 | 18 |
16 void *operator new(size_t size, CJBig2_Module *pModule, const FX_CHAR* filen
ame, int line); | 19 void operator delete(void* p, |
| 20 CJBig2_Module* pModule, |
| 21 const FX_CHAR* filename, |
| 22 int line); |
17 | 23 |
18 void operator delete(void *p, CJBig2_Module *pModule, const FX_CHAR* filenam
e, int line); | 24 void* operator new(size_t size, CJBig2_Module* pModule); |
19 | 25 |
20 void *operator new(size_t size, CJBig2_Module *pModule); | 26 void operator delete(void* p); |
21 | 27 |
22 void operator delete(void *p); | 28 void operator delete(void* p, CJBig2_Module* pModule); |
23 | 29 |
24 void operator delete(void *p, CJBig2_Module *pModule); | 30 void* operator new[](size_t size, |
| 31 CJBig2_Module* pModule, |
| 32 size_t unit_size, |
| 33 const FX_CHAR* filename, |
| 34 int line); |
25 | 35 |
26 void *operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size, | 36 void operator delete[](void* p, |
27 const FX_CHAR* filename, int line); | 37 CJBig2_Module* pModule, |
| 38 size_t unit_size, |
| 39 const FX_CHAR* filename, |
| 40 int line); |
28 | 41 |
29 void operator delete[](void *p, CJBig2_Module *pModule, size_t unit_size, | 42 void* operator new[](size_t size, CJBig2_Module* pModule, size_t unit_size); |
30 const FX_CHAR* filename, int line); | |
31 | 43 |
32 void *operator new[](size_t size, CJBig2_Module *pModule, size_t unit_size); | 44 void operator delete[](void* p); |
33 | 45 |
34 void operator delete[](void* p); | 46 void operator delete[](void* p, CJBig2_Module* pModule, size_t unit_size); |
35 | 47 |
36 void operator delete[](void *p, CJBig2_Module *pModule, size_t unit_size); | 48 public: |
37 public: | 49 CJBig2_Module* m_pModule; |
38 | |
39 CJBig2_Module *m_pModule; | |
40 }; | 50 }; |
41 #define JBIG2_NEW new(m_pModule) | 51 #define JBIG2_NEW new (m_pModule) |
42 #define JBIG2_ALLOC(p, a) p = JBIG2_NEW a; p->m_pModule = m_pModule; | 52 #define JBIG2_ALLOC(p, a) \ |
| 53 p = JBIG2_NEW a; \ |
| 54 p->m_pModule = m_pModule; |
43 #endif | 55 #endif |
OLD | NEW |