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