Commit Graph

182 Commits

Author SHA1 Message Date
michael
fd491e8647 * Fixed permissions on file create
git-svn-id: trunk@17560 -
2011-05-26 07:02:42 +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
sergei
41aeb9a22b * Rework TStream.CopyFrom (see Mantis #17980):
a) Use significantly larger buffer (128k instead of 1k)
b) When Count=0, do not try to determine the source size. Just copy until the source can be read. This should improve performance with limited seek capability sources (e.g. a decompression stream will be decompressed once rather than twice).
c) Use ReadBuffer/WriteBuffer, so an exception is raised when something goes wrong. This conforms to Delphi behavior.

git-svn-id: trunk@16992 -
2011-02-24 03:25:40 +00:00
michael
fa0454afe2 * Fixed references to sub components (mantis #18021)
git-svn-id: trunk@16448 -
2010-11-26 14:51:43 +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
marco
71aa7eaabd * fix from mantis 17818. Value is only peaked, add readvalue to also consume it.
git-svn-id: trunk@16301 -
2010-11-03 20:45:01 +00:00
sergei
ffc357a528 * TThread, Windows implementation: prevent resource leak when destroying an initially suspended and never resumed thread. The thread must be always resumed so that ThreadProc can complete and cleanup. Fixes Mantis #17560.
git-svn-id: trunk@16290 -
2010-11-01 22:37:33 +00:00
sekelsenmat
8b6e8079ec Fixes a potential crash in TStrings.SaveToStream
git-svn-id: trunk@16187 -
2010-10-19 15:50:13 +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
0207e5f8cd * fixed windows compilation after r15599
git-svn-id: trunk@15606 -
2010-07-19 09:24:26 +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
paul
a1d94c6829 rtl: implement TStreamAdapter.CopyTo, .SetSize, return proper error value for Clone instead of raising exception (#0016161) + test
git-svn-id: trunk@15138 -
2010-04-11 12:52:31 +00:00
paul
17687d90ce rtl: minor changes for TStreamAdapter:
- return STG_E_INVALIDPOINTER instead of E_INVLIDARG for Read,Write as msdn requires
  - return STG_E_INVALIDFUNCTION instead of E_INVLIDARG for Seek as msdn requires

git-svn-id: trunk@15127 -
2010-04-10 17:50:29 +00:00
michael
bc735a639f * Call specialchars in TStringList constructor
git-svn-id: trunk@15116 -
2010-04-08 06:51:26 +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
e2dbccf017 rtl: fix streaming of ancestor components - save/restore FRootAncestor in TWriter.WriteComponent because it can be changed by DoFindAncestor call (if IDE/or user code is connected to OnFindAncestor event)
git-svn-id: trunk@14969 -
2010-03-04 07:21:18 +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
marco
d742d6db58 * another fix for #15655, wrongly fixed in r14885
git-svn-id: trunk@14893 -
2010-02-12 22:32:22 +00:00
joost
8f90db3e98 * Fixed mem-leaks
git-svn-id: trunk@14891 -
2010-02-12 15:44:56 +00:00
marco
fb1e916ed2 * fix from mantis 15655 that adds notifiers to tlist.addlist.
git-svn-id: trunk@14885 -
2010-02-11 13:37:34 +00:00
marco
2c149e805a * fix for 15597. Added returnvalue to early-out exit().
git-svn-id: trunk@14818 -
2010-01-27 19:49:28 +00:00
Jonas Maebe
49f01e7b64 * replaced writelock of TMultiReadExclusiveWriteSynchronizer with a
critical section, so that it can be entered recursively just like
    the one from TSimpleRWSync + test
  - reverted r14593, since the reason for using TRWSync instead of
    TMultiReadExclusiveWriteSynchronizer was because the former
    supported recursive write locks

git-svn-id: trunk@14594 -
2010-01-10 12:14:21 +00:00
Jonas Maebe
47882716cf * use a TSimpleRWSync instead of a TMultiReadExclusiveWriteSynchronizer
for the globalnamespacelock, since it seems to require recursive locking
    (which TMultiReadExclusiveWriteSynchronizer does not support)

git-svn-id: trunk@14593 -
2010-01-10 11:41:55 +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
paul
1cd32f5327 rtl: implement TCollection.SetPropName
git-svn-id: trunk@14295 -
2009-12-02 03:40:26 +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
e018effcd2 * non-resolved methods are not written. Mantis 13846(laz) / 14798(fpc)
git-svn-id: trunk@14115 -
2009-11-08 14:21:03 +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
marco
21f569391b * Patch from Sergei/Anton. Mantis 10948. Under ifndef ver2_2
git-svn-id: trunk@14069 -
2009-11-05 20:42:18 +00:00
paul
8292fcc49e rtl: override TObject.Equals for TBits and TStrings classes
git-svn-id: trunk@14013 -
2009-11-03 02:01:06 +00:00
paul
aa5a5e79ce merge revisions: 13909,13923,13924,13934,13935,13942,13943,13944,13946,13948,13950,13951,13952,13983,13994:
rtl: add enumerators to the basic classes
tests: add enumerators test which compiles and work both by fpc and dcc
compiler: 
  + start for-in loop implementation: implement for-in loop for types (enumerations and ranges), strings, arrays and sets. todo: perform type checking, optimize array and string loops - use temp for expression, implement for-in loop for classes
test:
  + add a simple test for the 'for-in' loop
compiler: fix string for-in loop. now it uses a temp variable to store string expression result
complier: fix for-in array loop. use a temp variable for the loop expression only if loop is not an open array loop
complier: continue enumerator implementation:
  + add operator enumerator which give an ability to add enumerator for an existent type (for example to override builtin string enumerator)
  + add class enumerator support via delphi compatible GetEnumerator method + enumerator class/object template (function MoveNext: Boolean; property Current)
  + tests
compiler: fix for-in loop for arrays. delphi does not copy arrays to a temp variable and it is possible to change array during loop. + test
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: enumerator directive support:
  + allow to mark methods and properties by 'enumerator MoveNext' and 'enumerator Current' modifiers. Parser checks return types and duplicates.
  + prefer *marked* by enumerator directive methods and properties than GetEnumerator and Current builtin symbols
  + increase ppu version
  + test
rtl: add IEnumerator and IEnumerable interfaces declarations
tests: for-in loop tests:
  + add small comment at the top of test program
compiler: allow 'enumerator MoveNext' for the interface function declaration + test
compiler: move all for-in loop helpers to the nflw unit
compiler: don't allow the compiler to choose the non-valid enumerator operator for the for-in loop

git-svn-id: trunk@14008 -
2009-11-02 03:24:48 +00:00
paul
dfef902c53 rtl: introduce new TObject methods: UnitName, GetHashCode, Equals, ToString added for compatibility with delphi 2009.
+ changes in compiler, utils, packages to resolve identifier conflicts with the new TObject methods (like changing of UnitName arguments to AUnitName, adding Classes. before the toString, etc). (issue #0014931)

git-svn-id: trunk@14005 -
2009-11-01 16:22:47 +00:00
marco
09b22de964 * TStreamAdapter + relevant constants. From 10608
git-svn-id: trunk@13988 -
2009-10-31 20:13:41 +00:00