Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: core/include/fxcrt/fx_string.h

Issue 372473003: Remove custom memory manager (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Change malloc to calloc Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fxcrt/fx_stream.h ('k') | core/include/fxcrt/fx_xml.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 _FX_STRING_H_ 7 #ifndef _FX_STRING_H_
8 #define _FX_STRING_H_ 8 #define _FX_STRING_H_
9 class CFX_ByteStringC; 9 class CFX_ByteStringC;
10 class CFX_ByteString; 10 class CFX_ByteString;
11 class CFX_WideStringC; 11 class CFX_WideStringC;
12 class CFX_WideString; 12 class CFX_WideString;
13 struct CFX_CharMap; 13 struct CFX_CharMap;
14 class CFX_BinaryBuf; 14 class CFX_BinaryBuf;
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_LPSTR buf); 834 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_LPSTR buf);
835 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len); 835 CFX_ByteString FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len);
836 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr) 836 inline CFX_ByteString FX_UTF8Encode(FX_WSTR wsStr)
837 { 837 {
838 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength()); 838 return FX_UTF8Encode(wsStr.GetPtr(), wsStr.GetLength());
839 } 839 }
840 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr) 840 inline CFX_ByteString FX_UTF8Encode(const CFX_WideString &wsStr)
841 { 841 {
842 return FX_UTF8Encode((FX_LPCWSTR)wsStr, wsStr.GetLength()); 842 return FX_UTF8Encode((FX_LPCWSTR)wsStr, wsStr.GetLength());
843 } 843 }
844 class CFX_ByteStringL : public CFX_ByteStringC
845 {
846 public:
847 CFX_ByteStringL() : CFX_ByteStringC() {}
848 ~CFX_ByteStringL() {}
849
850 void Empty(IFX_Allocator* pAllocator);
851 FX_LPSTR AllocBuffer(FX_STRSIZE length, IFX_Allocator* pAllocator);
852
853 void Set(FX_BSTR src, IFX_Allocator* pAllocator);
854 };
855 class CFX_WideStringL : public CFX_WideStringC
856 {
857 public:
858 CFX_WideStringL() : CFX_WideStringC() {}
859 ~CFX_WideStringL() {}
860
861 void Empty(IFX_Allocator* pAllocator);
862 void Set(FX_WSTR src, IFX_Allocator* pAllocator);
863
864 int GetInteger() const;
865 FX_FLOAT GetFloat() const;
866
867 void TrimRight(FX_LPCWSTR lpszTargets);
868 };
869 void FX_UTF8Encode(FX_LPCWSTR pwsStr, FX_STRSIZE len, CFX_ByteStringL &utf8St r, IFX_Allocator* pAllocator = NULL);
870 #endif 844 #endif
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_stream.h ('k') | core/include/fxcrt/fx_xml.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698