Commit Graph

79 Commits

Author SHA1 Message Date
nickysn
4953fd0bb0 * use CodePointer in Classes.TReader.FindMethod() and TFindMethodEvent for i8086 medium memory model compatibility
git-svn-id: trunk@25153 -
2013-07-20 22:10:22 +00:00
michael
4afefd6cbe * Added AddText as suggested in bug ID #24764
git-svn-id: trunk@25129 -
2013-07-19 07:16:06 +00:00
marco
eebfeca41d * removed all ver2_* defines older than 2_4. 2_4 can probably also get removed from trunk, but better in a separate commit.
git-svn-id: trunk@24971 -
2013-06-25 12:46:30 +00:00
nickysn
730f7c82b7 * some fixes, intended to get units fgl and classes to compile on 16-bit cpus
git-svn-id: trunk@24649 -
2013-05-30 18:58:25 +00:00
svenbarth
930b76e8fb Fix compilation of WinCE. Change the fixed UNICODE define of WinCE to FPC_OS_UNICODE, so that it won't be undefined when changing the mode/string type and that the usage of a UNICODE API is independant of the mode.
Also adjusted all Windows (Win32/64/CE) units to define a "UNICODE" if "FPC_OS_UNICODE" is defined (except the Jedi units).
Also the common RTL units that checked for UNICODE now check for FPC_OS_UNICODE.

git-svn-id: trunk@24420 -
2013-05-04 11:06:32 +00:00
marco
4d9f1629d9 * removed a workaround for pre 2.6.0 fpdocs
git-svn-id: trunk@24294 -
2013-04-21 21:33:10 +00:00
svenbarth
764f36a179 Extend TThread with (class) methods and (class) properties from Delphi 2007 and newer.
Especially for the introduction of the Queue method the internal Synchronize handling was modified. Instead of handling only one event there is now a queue of events which is walked completely when CheckSynchronize is called. Each entry in the queue can carry a PRTLEvent which will be signaled when the contained method has been executed and thus Synchronize methods can still be blocking.
Exceptions inside the queued methods are either handed back to the calling method for Synchronize events or raised directly (after leaving the queue in a valid state) to the caller of CheckSynchronize.

The way platform specific adjustments can be made to TThread was changed. Instead of implementing the Constructor and Destructor directly one now implements the methods SysCreate and SysDestroy which are called from the Constructor and Destructor respectively. All RTLs were adjusted for this and should be controlled by the platform maintainers for correct compilation (Unix works).

The new method NameThreadForDebugging has two overloaded variants: one with the thread name as AnsiString and one with the thread name as UnicodeString.
By default the AnsiString variant calls the UnicodeString variant and the latter needs to be implemented. This can be changed by defining THREADNAME_IS_ANSISTRING for a platform. Then the UnicodeString variant calls the AnsiString one and the AnsiString one needs to be implemented.

Also added was a global property CPUCount for the System unit. This property returns the number of virtual cores of the system.

New methods and functions that should be implemented per platform are:
System.GetCPUCount (default returns 1)
Classes.TThread.GetSystemTimes (default zeros the struct)
Classes.TThread.NameThreadForDebugging (default does nothing)

More detailed information about the added methods will be available in the feature announcement mail.

git-svn-id: trunk@23227 -
2012-12-27 16:16:17 +00:00
michael
11a531ab62 * Fixed bug #23477
git-svn-id: trunk@23135 -
2012-12-12 15:21:28 +00:00
michael
e3b48d6eb2 * Simplified observer/observed GUIDs, patch from Luiz Americo (Bug ID 23420)
git-svn-id: trunk@23088 -
2012-12-02 11:09:51 +00:00
michael
217679843e * IFPObserver methods made public
git-svn-id: trunk@23080 -
2012-11-29 13:28:11 +00:00
marco
5d42d3a53c * change make TBinaryObjectWriter.WriteStr public mantis #22973
Delphi seems to use .writestr also for shortstring only, so the 
   function is the same.

git-svn-id: trunk@22556 -
2012-10-06 10:06:55 +00:00
Jonas Maebe
404e1a34a4 * changed resource handle parameters from THandle to TFPResourceHMODULE so
they don't truncate the handle data on 64 bit platforms (patch by
    Anton Kavalenka, mantis #21721)

git-svn-id: trunk@22392 -
2012-09-14 15:05:08 +00:00
michael
441e059f32 * Changed ooChanged to ooChange, to be more consistent with tense in other values
git-svn-id: trunk@22262 -
2012-08-28 12:32:15 +00:00
michael
43be53351e * Added observer support
git-svn-id: trunk@22257 -
2012-08-27 19:28:14 +00:00
marco
666fecb6df * workaround for unsupported construct in fpdoc. (enum declared nested in class)
git-svn-id: trunk@21999 -
2012-08-02 13:01:27 +00:00
michael
d3fa1b4979 * Fix for bug #21691
git-svn-id: trunk@20779 -
2012-04-10 07:49:40 +00:00
michael
ab0a7d096c * Overloaded AddStrings
git-svn-id: trunk@20691 -
2012-04-02 11:22:02 +00:00
michael
d1b209025f * Applied patch from Luiz Amerigo to have Delphi compatible behaviour when freeing a stringlist (bug 21529)
git-svn-id: trunk@20570 -
2012-03-22 12:10:06 +00:00
marco
39bc3b9dcf * remove empty override tpersist.destroy(), patch by Luiz Americo, Mantis #21387
git-svn-id: trunk@20460 -
2012-03-01 21:47:32 +00:00
florian
cd2488d177 * fix compilation on 64 Bit targets
git-svn-id: trunk@19393 -
2011-10-06 17:54:44 +00:00
paul
7817f5017d rtl: add TBytesStream class for compatibility with delphi (TStringStream is a descendant of TBytesStream) + test
git-svn-id: trunk@19389 -
2011-10-06 04:41:10 +00:00
michael
4a8914cbb0 * Implemented IndexOfItem, reversed search again in IndexOf
git-svn-id: trunk@19279 -
2011-09-29 07:50:24 +00:00
marco
47af891513 * change resourcestream.handle from thandle to TPFResourceHGlobal, since it is
a pointer, and handle is a 32-bit integer on 64-bit *nix.

git-svn-id: trunk@19042 -
2011-09-10 10:00:27 +00:00
michael
96e5333dc2 * Added fakeSeekForward for benefit of descendant streams.
* Override GetSize/Position for memory/stringstream for efficiency
* Added InvalidSeek exception throwing. Should be overridden to throw custom exceptions.

git-svn-id: trunk@18190 -
2011-08-13 18:45:48 +00:00
michael
a201f07420 * Added share mode argument to FileCreate call
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
paul
812a665cbe rtl: don't crash if resource is not found in TResourceStream and was passed by ID instead of Name (in this case exception tried to get a string from ID)
git-svn-id: trunk@17173 -
2011-03-24 03:44:26 +00:00
marco
32a7502f38 * Change TProxyStream.seek to 64-bit variant.
git-svn-id: trunk@17093 -
2011-03-08 15:13:53 +00:00
michael
c4cc9b59e0 * Tag is now PtrInt, for upcoming Delphi 64-bit compatibility
git-svn-id: trunk@16408 -
2010-11-23 21:19:39 +00:00
michael
a1d8ad7a27 * Changed var to out in TStringList.Find
git-svn-id: trunk@16395 -
2010-11-21 18:20:44 +00:00
sergei
907e7a32d5 * GetFileHandle(), THandleStream: changed type that is used to store file handle from Integer to THandle, so it can be redefined to 64 bits on certain platforms, see http://lists.freepascal.org/lists/fpc-devel/2010-November/023019.html
git-svn-id: trunk@16383 -
2010-11-20 12:58:53 +00:00
joost
07bf44517c * Merged XPCom branch into trunk, added support for constref and changed
the IInterface implementation to be XPCom-compatible
--- Merging r15997 through r16179 into '.':
U    rtl/inc/variants.pp
U    rtl/inc/objpash.inc
U    rtl/inc/objpas.inc
U    rtl/objpas/classes/persist.inc
U    rtl/objpas/classes/compon.inc
U    rtl/objpas/classes/classesh.inc
A    tests/test/tconstref1.pp
A    tests/test/tconstref2.pp
A    tests/test/tconstref3.pp
U    tests/test/tinterface4.pp
A    tests/test/tconstref4.pp
U    tests/webtbs/tw10897.pp
U    tests/webtbs/tw4086.pp
U    tests/webtbs/tw15363.pp
U    tests/webtbs/tw2177.pp
U    tests/webtbs/tw16592.pp
U    tests/tbs/tb0546.pp
U    compiler/sparc/cpupara.pas
U    compiler/i386/cpupara.pas
U    compiler/pdecsub.pas
U    compiler/symdef.pas
U    compiler/powerpc/cpupara.pas
U    compiler/avr/cpupara.pas
U    compiler/browcol.pas
U    compiler/defcmp.pas
U    compiler/powerpc64/cpupara.pas
U    compiler/ncgrtti.pas
U    compiler/x86_64/cpupara.pas
U    compiler/opttail.pas
U    compiler/htypechk.pas
U    compiler/tokens.pas
U    compiler/objcutil.pas
U    compiler/ncal.pas
U    compiler/symtable.pas
U    compiler/symsym.pas
U    compiler/m68k/cpupara.pas
U    compiler/regvars.pas
U    compiler/arm/cpupara.pas
U    compiler/symconst.pas
U    compiler/mips/cpupara.pas
U    compiler/paramgr.pas
U    compiler/psub.pas
U    compiler/pdecvar.pas
U    compiler/dbgstabs.pas
U    compiler/options.pas
U    packages/fcl-fpcunit/src/testutils.pp

git-svn-id: trunk@16180 -
2010-10-17 20:58:22 +00:00
marco
a680c63950 * TThread.Resume and suspend deprecated (see user changes trunk)
git-svn-id: trunk@16171 -
2010-10-15 22:15:57 +00:00
sergei
a66876704b * Windows platforms: always start a thread in suspended state and resume it later in AfterConstruction if necessary, prevents race conditions in constructor. Fixes Mantis #16884 on Windows.
git-svn-id: trunk@16091 -
2010-10-06 16:57:15 +00:00
marco
6ebda8f2cc * D2009 compat: TStringList.OwnsObjects
git-svn-id: trunk@16058 -
2010-09-28 14:52:44 +00:00
michael
4d2786d238 * Patch from Luiz americo to use FPList where possible
git-svn-id: trunk@15663 -
2010-07-30 09:06:18 +00:00
Jonas Maebe
d7cdd9afba * allow tthread-based threads to only start executing once the constructor
has finished running (based on patch by Jared Davison, mantis #16884)

git-svn-id: trunk@15599 -
2010-07-18 16:31:25 +00:00
marco
d8707ec5d3 * hmodule should scale with pointertype on non-windows.
git-svn-id: trunk@15510 -
2010-07-02 20:08:05 +00:00
michael
037c783442 * Patch from Mattias gaertner to support lazarus lfm encoding in TParser
git-svn-id: trunk@15415 -
2010-06-12 20:54:33 +00:00
michael
561972e0fc * Added TDataModuleClass class pointer
git-svn-id: trunk@15353 -
2010-05-31 09:53:18 +00:00
Jonas Maebe
c67712f81f + tthread.start method, simply calls tthread.resume for now (mantis #16326)
git-svn-id: trunk@15165 -
2010-04-24 14:52:08 +00:00
michael
f29973cc71 * Added Exchange to TCollection. Bug ID #15517
git-svn-id: trunk@15012 -
2010-03-14 10:25:32 +00:00
paul
8d7312f87b rtl: use CreateVCLComObject routing to create VCLComObject in case it is not assigned + test
git-svn-id: trunk@14948 -
2010-02-27 08:49:50 +00:00
paul
9aa4504369 rtl: initial TComponent.VCLComObject support - map interface related TComponent methods to the appropriate IVCLComObject interface methods
git-svn-id: trunk@14947 -
2010-02-27 08:05:51 +00:00
paul
ea8bf4f2fd rtl: TObject.SafeCallException and TComponent.SafeCallException has HResult return value. Fix default return value to catastrophic failure error code.
git-svn-id: trunk@14936 -
2010-02-25 04:13:52 +00:00
florian
42ae8bf971 * fixed memory stream compilation on 64 bit targets
git-svn-id: trunk@14523 -
2010-01-02 16:05:57 +00:00
florian
b5167560c3 * T*MemoryStream now uses PtrInt for sizes and positions so it can be bigger than 2 GB on 64 Bit systems, resolves #15313
git-svn-id: trunk@14513 -
2010-01-01 21:05:18 +00:00
giulio2
d257b19798 * Skip UTF-8 BOM in TParser (classes) and dfmreader (fcl-res)
git-svn-id: trunk@14292 -
2009-11-30 21:55:25 +00:00
marco
805e5a79c6 * writer.writeset, reader.readset as per mantis 10501
git-svn-id: trunk@14200 -
2009-11-16 12:50:18 +00:00
marco
27114853b4 * TStream.Read/writeqword. Mantis 15023
git-svn-id: trunk@14111 -
2009-11-08 11:47:50 +00:00
marco
6ed7d33569 * patch from 15003 from M spiller, reverting now implemented.
git-svn-id: trunk@14078 -
2009-11-06 10:52:23 +00:00