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 #include "../../core/include/fxcodec/fx_codec.h" | 7 #include "../../core/include/fxcodec/fx_codec.h" |
8 #include "../../core/include/fxcrt/fx_safe_types.h" | 8 #include "../../core/include/fxcrt/fx_safe_types.h" |
9 #include "../../public/fpdf_ext.h" | 9 #include "../../public/fpdf_ext.h" |
10 #include "../../public/fpdf_progressive.h" | 10 #include "../../public/fpdf_progressive.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 IJS_Runtime::Initialize(cfg->m_v8EmbedderSlot, cfg->m_pIsolate); | 114 IJS_Runtime::Initialize(cfg->m_v8EmbedderSlot, cfg->m_pIsolate); |
115 } | 115 } |
116 | 116 |
117 DLLEXPORT void STDCALL FPDF_DestroyLibrary() { | 117 DLLEXPORT void STDCALL FPDF_DestroyLibrary() { |
118 #if _FX_OS_ == _FX_LINUX_EMBEDDED_ | 118 #if _FX_OS_ == _FX_LINUX_EMBEDDED_ |
119 delete g_pFontMapper; | 119 delete g_pFontMapper; |
120 g_pFontMapper = nullptr; | 120 g_pFontMapper = nullptr; |
121 #endif | 121 #endif |
122 CPDF_ModuleMgr::Destroy(); | 122 CPDF_ModuleMgr::Destroy(); |
123 CFX_GEModule::Destroy(); | 123 CFX_GEModule::Destroy(); |
| 124 |
124 delete g_pCodecModule; | 125 delete g_pCodecModule; |
125 g_pCodecModule = nullptr; | 126 g_pCodecModule = nullptr; |
126 } | 127 } |
127 | 128 |
128 #ifndef _WIN32 | 129 #ifndef _WIN32 |
129 int g_LastError; | 130 int g_LastError; |
130 void SetLastError(int err) { | 131 void SetLastError(int err) { |
131 g_LastError = err; | 132 g_LastError = err; |
132 } | 133 } |
133 | 134 |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 if (!buffer) { | 913 if (!buffer) { |
913 *buflen = len; | 914 *buflen = len; |
914 } else if (*buflen >= len) { | 915 } else if (*buflen >= len) { |
915 memcpy(buffer, utf16Name.c_str(), len); | 916 memcpy(buffer, utf16Name.c_str(), len); |
916 *buflen = len; | 917 *buflen = len; |
917 } else { | 918 } else { |
918 *buflen = -1; | 919 *buflen = -1; |
919 } | 920 } |
920 return (FPDF_DEST)pDestObj; | 921 return (FPDF_DEST)pDestObj; |
921 } | 922 } |
OLD | NEW |