Skip to content
Permalink
Browse files

re-disable NOSETTHREADNAME by default

  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Jun 23, 2019
1 parent a0b419e commit f941e09b749b79e1df12fd649799859843d40152
Showing with 13 additions and 6 deletions.
  1. +11 −4 SynCommons.pas
  2. +1 −1 Synopse.inc
  3. +1 −1 SynopseCommit.inc
if HResInfo=0 then
exit;
HGlobal := LoadResource(Instance,HResInfo);
if HGlobal<>0 then
if HGlobal<>0 then begin
SetString(buf,PAnsiChar(LockResource(HGlobal)),SizeofResource(Instance,HResInfo));
UnlockResource(HGlobal); // only needed outside of Windows
FreeResource(HGlobal);
end;
end;

procedure ResourceSynLZToRawByteString(const ResName: string;
exit;
HGlobal := LoadResource(Instance,HResInfo);
if HGlobal<>0 then // direct decompression from memory mapped .exe content
SynLZDecompress(LockResource(HGlobal),SizeofResource(Instance,HResInfo),buf);
try
AlgoSynLZ.Decompress(LockResource(HGlobal),SizeofResource(Instance,HResInfo),buf);
finally
UnlockResource(HGlobal); // only needed outside of Windows
FreeResource(HGlobal);
end;
end;

function StrLenW(S: PWideChar): PtrInt;

procedure TSynTimeZone.LoadFromBuffer(const Buffer: RawByteString);
begin
fZones.LoadFrom(pointer(SynLZDecompress(Buffer)));
fZones.LoadFrom(pointer(AlgoSynLZ.Decompress(Buffer)));
fZones.ReHash(false);
FreeAndNil(fIds);
FreeAndNil(fDisplays);
SetUnixThreadName(ThreadID, Name); // call pthread_setname_np()
{$endif}
{$else}
begin
{$ifndef NOSETTHREADNAME}
var s: RawByteString;
{$ifndef ISDELPHIXE2}
@@ -120,7 +120,7 @@
// be affected (unless you use the enhanced RTTI for record/dynamic array JSON
// serialization) - left undefined by default to ensure minimal impact

{$define NOSETTHREADNAME}
{.$define NOSETTHREADNAME}
// if defined, SetThreadName() would not raise the exception used to set the
// thread name: to be defined if you have issues when debugging your application

@@ -1 +1 @@
'1.18.5253'
'1.18.5254'

0 comments on commit f941e09

Please sign in to comment.
You can’t perform that action at this time.