Commit Graph

264 Commits

Author SHA1 Message Date
svenbarth
bb11ec6375 + add TRttiType.GetMethod to find a method by name
git-svn-id: trunk@39884 -
2018-10-07 12:25:30 +00:00
svenbarth
be698b970b * ensure the correct values for TValue.GetReferenceToRawData for TObject and dynamic array types
git-svn-id: trunk@39883 -
2018-10-07 12:25:27 +00:00
svenbarth
00e700d598 * adjust Invoke API of FunctionCallManager to not rely on TValue
git-svn-id: trunk@39881 -
2018-10-07 12:25:21 +00:00
svenbarth
608da3d255 * ensure that a valid reference to the raw data is provided as long as the typeinfo is set
git-svn-id: trunk@39879 -
2018-10-07 12:25:15 +00:00
svenbarth
daa91bc462 * fix casing of constructors so that Lazarus doesn't complete them in lowercase
git-svn-id: trunk@39878 -
2018-10-07 12:25:12 +00:00
yury
8c59eb1ce5 * Regenerated makefiles to support aarch64-android.
git-svn-id: trunk@39863 -
2018-10-06 09:36:03 +00:00
pierre
4e7003fb94 Update all packages Makefile's
git-svn-id: trunk@39828 -
2018-09-27 07:05:49 +00:00
pierre
41d2a0a496 Disable libraries not compiling for jvm-java or jvm-android targets
git-svn-id: trunk@39808 -
2018-09-26 09:29:33 +00:00
marco
98f00acb06 * trunk to 3.3.1
git-svn-id: trunk@39635 -
2018-08-18 15:47:44 +00:00
marco
d143ab60e1 * regenned makefile without date/rev components for easier merging.
git-svn-id: trunk@39630 -
2018-08-18 15:06:25 +00:00
pierre
0064860f75 Changes for symbian target OS
git-svn-id: trunk@39577 -
2018-08-06 15:14:25 +00:00
michael
b5aa9fd20a * Remove BOM marker, it confuses fpdoc
git-svn-id: trunk@39451 -
2018-07-14 16:22:50 +00:00
michael
6568dea8a9 * Fix bug #0033623, add parameters to UnixToDateTime/DateTimeTounix to return/accept UTC
git-svn-id: trunk@39444 -
2018-07-13 07:23:08 +00:00
michael
4b45825204 * Fix bug #33795
git-svn-id: trunk@39161 -
2018-06-02 11:09:33 +00:00
michael
659bf09325 * Fix typo in ansiEndsString, resulting in wrong behaviour
git-svn-id: trunk@38777 -
2018-04-16 09:45:44 +00:00
michael
54f3cc664e * Patch from Serge Anvarov to improve AnsiStartsWith/AnsiEndsWith/Dupestring (Patch attached to bug #33559)
git-svn-id: trunk@38768 -
2018-04-14 11:32:02 +00:00
michael
c674f2c31c * Added (Date/Time)InRange, patch from Enrique Fuentes, bug ID #33598
git-svn-id: trunk@38767 -
2018-04-14 09:02:46 +00:00
pierre
a93fe1b363 Regenerated Makefile's after addition of ppas and ppaslink script removal in rev 38745
git-svn-id: trunk@38751 -
2018-04-12 15:26:33 +00:00
pierre
e6fd693ea8 Avoid accessing inputStr or Wilds strings past their sizes: maxinputword and maxwilds
git-svn-id: trunk@38653 -
2018-03-31 15:46:55 +00:00
pierre
40f443a974 Add SKIPTARGET for OSes that do not compile fcl-fpcunit
git-svn-id: trunk@38643 -
2018-03-28 14:27:25 +00:00
michael
16ba47be46 * Patch from Ondrej Pokorny to convert unit names to CamelCase (bug ID 33481)
git-svn-id: trunk@38616 -
2018-03-23 22:06:36 +00:00
marco
3afba76bce * modified Patch from #33018 by 隆博. Locale aware datefromstr functions.
git-svn-id: trunk@38358 -
2018-02-27 10:51:06 +00:00
marco
3b4c330d32 * trivial implementation for #33163 [starts|ends][text|str]
git-svn-id: trunk@38350 -
2018-02-26 07:52:31 +00:00
marco
8ba434b2f4 * added hex2dec64, 64-bit equivalent of hex2dec, mantis #33228
git-svn-id: trunk@38339 -
2018-02-25 15:27:53 +00:00
marco
1d5d5682d2 * mantis #30853, set precision and signspecialplaces in delphi compat way.
git-svn-id: trunk@38333 -
2018-02-24 20:55:14 +00:00
marco
5f7ad0ecf0 * ConvertFrom, DescriptionToConvFamily, DescriptionToConvType initial
implementation with some fixes, patch from peter popov mantis 33181

git-svn-id: trunk@38295 -
2018-02-20 17:00:40 +00:00
michael
551d3eda26 * Fix bug #33078, missing MatchText
git-svn-id: trunk@38063 -
2018-01-28 09:32:04 +00:00
michael
a94ebf008c * Fix bug #33079, missing IndexText
git-svn-id: trunk@38062 -
2018-01-28 09:29:30 +00:00
michael
f455b6f4df * Made FindMatchesBoyerMoore a function, returns true if matches are found (Bug ID 32928)
git-svn-id: trunk@37955 -
2018-01-13 11:07:28 +00:00
Jonas Maebe
8cfe7e0a0c * when creating a realconstn, cast the value to the specified type
(mantis #25121)
   o note that this means that single_const1/single_const2 will now be rounded
     to single, instead of staying the at maximum precision
   o fixed FahrenheitToCelcius() to handle this change correctly

git-svn-id: trunk@37911 -
2018-01-04 20:51:36 +00:00
svenbarth
88a9d07820 * extend test so that the methods and parameters of interfaces are checked as well
git-svn-id: trunk@37764 -
2017-12-18 21:37:50 +00:00
svenbarth
1ee24374f1 * implement GetDeclaredMethods() for interface types
git-svn-id: trunk@37763 -
2017-12-18 21:30:58 +00:00
svenbarth
16b20911bd + add methods to retrieve an array of methods of a type (both those only declared in the current type as well as all of the type's hierarchy)
git-svn-id: trunk@37762 -
2017-12-18 21:23:01 +00:00
svenbarth
f8c5272b8f + add method to query the method count of an interface
git-svn-id: trunk@37761 -
2017-12-18 21:05:43 +00:00
svenbarth
3e25e153e0 + add implementation class for methods of an interface
git-svn-id: trunk@37760 -
2017-12-18 20:56:02 +00:00
svenbarth
6c02433e1e + add methods to easily access a context token's AddObject() and GetByHandle() methods inside the Rtti unit
git-svn-id: trunk@37759 -
2017-12-18 20:55:21 +00:00
svenbarth
7ad3a0f12c + add implementation class for parameters of methods that belong to a VMT-based type
git-svn-id: trunk@37758 -
2017-12-18 20:42:29 +00:00
svenbarth
68c7308de3 - remove unused variable
git-svn-id: trunk@37757 -
2017-12-18 20:31:26 +00:00
svenbarth
28640ba350 + add base types for the RTTI of methods and parameters
git-svn-id: trunk@37756 -
2017-12-18 20:29:29 +00:00
svenbarth
c15bcc693d * also check the base types of interfaces
git-svn-id: trunk@37706 -
2017-12-08 23:01:25 +00:00
svenbarth
b1029a218a * also implement TRttiType's GetBaseType in TRttiInterfaceType
git-svn-id: trunk@37705 -
2017-12-08 22:58:58 +00:00
svenbarth
1cb4514526 + add support for interface types (both reference counted and raw ones)
git-svn-id: trunk@37704 -
2017-12-08 22:52:26 +00:00
svenbarth
0954572af9 * only check result if the call itself succeeded (e.g. didn't fail due to the invoke manager not supporting the calling convention)
git-svn-id: trunk@37700 -
2017-12-08 14:56:48 +00:00
pierre
d18627f0af * Update all fpcsrc Makefile's using latest fpcmake version 2017-09-21 rev 37286
git-svn-id: trunk@37462 -
2017-10-16 00:27:27 +00:00
svenbarth
a0fb85b690 - remove no longer needed aligntoptr() and aligntoqword() functions (all this should be handled by the typinfo unit in the future)
git-svn-id: trunk@37424 -
2017-10-07 22:08:05 +00:00
svenbarth
89645633a9 * get rid of calls to aligntoptr by using methods provided by TClassData and TPropInfo
git-svn-id: trunk@37423 -
2017-10-07 22:02:40 +00:00
svenbarth
da30391a6a * FillChar for the properties is not needed as SetLength already initializes the array elements
git-svn-id: trunk@37422 -
2017-10-07 21:51:18 +00:00
svenbarth
57db4b47e1 - remove unneeded type declaration
git-svn-id: trunk@37421 -
2017-10-07 21:44:51 +00:00
svenbarth
d9bc656852 * use new pool functionality for property instances
* extended test

git-svn-id: trunk@37418 -
2017-10-07 17:32:28 +00:00
svenbarth
1cbb4266d7 * rework Rtti pool so that non-types (e.g. properties, etc.) can be stored as well based on their handle
git-svn-id: trunk@37417 -
2017-10-07 16:36:48 +00:00
svenbarth
f8d919970a * since the property data is different for records, classes and interfaces they need to be handled by the concrete Rtti type (currently only TRttiInstanceType) and not the general TRttiType type
git-svn-id: trunk@37416 -
2017-10-07 15:40:38 +00:00
svenbarth
29eb742ded * move aligntoptr() and aligntoqword() further up so they can be used by other code as well
git-svn-id: trunk@37415 -
2017-10-07 15:33:22 +00:00
svenbarth
49fc13ea73 * move Handle property to TRttiObject (Delphi compatible and is probably also used for the caching mechanism)
git-svn-id: trunk@37414 -
2017-10-07 15:10:23 +00:00
svenbarth
4489163620 * declare TRttiObject as abstract
git-svn-id: trunk@37413 -
2017-10-07 15:05:22 +00:00
svenbarth
c35f694fb8 - remove unused local type
git-svn-id: trunk@37412 -
2017-10-07 14:59:33 +00:00
svenbarth
bfd37969ad * move TRttiStructuredType and TRttiInstanceType further down as they need access to TRttiMember and its children
git-svn-id: trunk@37408 -
2017-10-06 13:10:01 +00:00
svenbarth
0c8f670ee0 + add TRttiPointerType
* extend Rtti test

git-svn-id: trunk@37402 -
2017-10-05 21:10:30 +00:00
svenbarth
5c85e94919 + add TRttiNamedObject.Handle property of which the getter needs to be overridden in each sub class
git-svn-id: trunk@37401 -
2017-10-05 21:06:47 +00:00
svenbarth
98bb449945 * raise an exception if routine to be invoked isn't static, but there's no parameter to be used as Self
git-svn-id: trunk@37386 -
2017-10-02 19:39:37 +00:00
svenbarth
794eb7c122 * ensure that FLock is released in case of an exception
git-svn-id: trunk@37385 -
2017-10-02 18:51:52 +00:00
pierre
5eff63164d Enable strutils,varutils,fmtbcd units for symbian, watcom and wii targets
git-svn-id: trunk@37278 -
2017-09-20 16:00:59 +00:00
svenbarth
179b59753d + add optional, not by default enabled test for Invoke
git-svn-id: trunk@37095 -
2017-08-31 21:10:10 +00:00
svenbarth
236c2344a9 + add Invoke() function and functions to generate callback functions with a procedure or method variable
git-svn-id: trunk@37094 -
2017-08-31 21:07:32 +00:00
svenbarth
2471cd57b5 + add manager framework which provides implementations for invoking functions at runtime and generating function implementations
git-svn-id: trunk@37093 -
2017-08-31 21:05:03 +00:00
svenbarth
c6cd64a790 + add new methods AsUnicodeString and AsAnsiString which are internally used by AsString depending on the type of String
git-svn-id: trunk@37092 -
2017-08-31 20:26:52 +00:00
svenbarth
4fcd0391ae * use new SetSize field to simplify set handling in TValue
git-svn-id: trunk@37091 -
2017-08-31 20:23:52 +00:00
svenbarth
ce958cacc4 + add and document a way to hide the generic methods from Lazarus' CodeTools as they don't support them yet
git-svn-id: trunk@37082 -
2017-08-29 18:38:24 +00:00
svenbarth
92caf587f5 + add generic function TValue.From<> which is a shorthand of TValue.Make()
git-svn-id: trunk@37081 -
2017-08-29 18:37:13 +00:00
svenbarth
46de720c63 - since DataSize for method pointers works correctly remove the "?"-comment
git-svn-id: trunk@37078 -
2017-08-27 15:31:54 +00:00
svenbarth
4ff6c7bddf + add Delphi compatible exception types
git-svn-id: trunk@37077 -
2017-08-27 15:30:38 +00:00
svenbarth
fde056899d + add a TArray specialization for TValue as Lazarus does not yet handle inline specializations in parameter declarations gracefully
git-svn-id: trunk@37076 -
2017-08-27 15:29:57 +00:00
svenbarth
0b1b82bb2d * test reference of empty values of different types
git-svn-id: trunk@37075 -
2017-08-27 14:02:14 +00:00
svenbarth
a06ed3c929 * adjust handling of empty buffer as a valid reference is needed nevertheless
git-svn-id: trunk@37074 -
2017-08-27 14:01:36 +00:00
svenbarth
25d9c85a87 - remove debug output -.-
git-svn-id: trunk@37073 -
2017-08-27 13:30:06 +00:00
svenbarth
36451e271c * test for unassigned TypeInfo
git-svn-id: trunk@37072 -
2017-08-27 13:29:14 +00:00
svenbarth
93a65d3a78 * correctly handle the case of an unassigned TypeInfo
git-svn-id: trunk@37071 -
2017-08-27 13:28:49 +00:00
svenbarth
4de7b43a5c * enable tests of TTestMethod, TTestEnum and TTestSet now that they're public and Delphi doesn't complain anymore about them not having any runtime information...
git-svn-id: trunk@37070 -
2017-08-27 12:42:45 +00:00
svenbarth
60217d87a4 * implement handling of tkSet (which is a hybrid type regarding its storage)
git-svn-id: trunk@37069 -
2017-08-27 12:41:57 +00:00
svenbarth
820ba03ef0 * allow making a value of a enumeration
git-svn-id: trunk@37068 -
2017-08-27 12:41:14 +00:00
svenbarth
b1439c066a * share types to reduce unnecessary duplication
git-svn-id: trunk@37067 -
2017-08-27 11:59:34 +00:00
svenbarth
4dc6d1f8f6 * test for correct DataSize if value is empty
git-svn-id: trunk@37066 -
2017-08-27 11:47:39 +00:00
svenbarth
4ae1d65bad * GetDataSize also needs to return a valid size if the value is empty
git-svn-id: trunk@37065 -
2017-08-27 11:47:07 +00:00
svenbarth
621316c6dc * raw interfaces are not handled through IValueData so correctly return their size in GetDataSize
git-svn-id: trunk@37064 -
2017-08-27 11:46:15 +00:00
svenbarth
5f02c30eed * explicitely state which check failed
git-svn-id: trunk@37063 -
2017-08-27 11:42:59 +00:00
svenbarth
1dccc3469b * more correct cleaning of the variant part of TValueData in case a Pointer is larger or equal to QWord in size
git-svn-id: trunk@37062 -
2017-08-27 11:42:06 +00:00
Károly Balogh
04dee0fc04 regenerated Makefiles for m68k-macos target
git-svn-id: trunk@37034 -
2017-08-22 11:16:42 +00:00
svenbarth
0f484eb032 * change from SimpleTestRunner to ConsoleTestRunner and specify CONFIGFILE flag for the testsuite
git-svn-id: trunk@36994 -
2017-08-20 20:25:02 +00:00
svenbarth
292dff2e8c + add test for TValue.DataSize
git-svn-id: trunk@36991 -
2017-08-20 19:50:49 +00:00
svenbarth
a8167f897d * allow making a TValue with a pointer
git-svn-id: trunk@36990 -
2017-08-20 19:50:19 +00:00
svenbarth
e74034dc34 * allow making a TValue with a procedure/function or method variable
git-svn-id: trunk@36989 -
2017-08-20 19:50:00 +00:00
svenbarth
9dff6043d9 * correctly handle DataSize for ShortString
git-svn-id: trunk@36988 -
2017-08-20 19:49:14 +00:00
svenbarth
c74afe6824 * expand test cases
git-svn-id: trunk@36987 -
2017-08-20 19:21:48 +00:00
svenbarth
00757ec79f + add AsInt64 and AsUInt64
git-svn-id: trunk@36986 -
2017-08-20 19:21:05 +00:00
svenbarth
5f116c4cec * empty class and object instance seems to be handled a bit different
git-svn-id: trunk@36985 -
2017-08-20 19:20:42 +00:00
svenbarth
ae6352611f * correctly handle IsEmpty if Nil had been passed to Make
git-svn-id: trunk@36984 -
2017-08-20 19:19:41 +00:00
svenbarth
a03b9d0fc4 * correctly handle AsString if Nil had been passed to Make
git-svn-id: trunk@36983 -
2017-08-20 19:19:07 +00:00
svenbarth
0387df3228 * allow the buffer passed to Make() to be Nil
git-svn-id: trunk@36981 -
2017-08-20 19:08:57 +00:00
svenbarth
bd74f9af64 * also initialize variant part in Empty function
git-svn-id: trunk@36980 -
2017-08-20 19:08:27 +00:00
svenbarth
3cb8cb293d * correctly raise exception
git-svn-id: trunk@36979 -
2017-08-20 19:07:55 +00:00
svenbarth
6a95291eda * always clear the variant part of FData
git-svn-id: trunk@36975 -
2017-08-20 18:31:52 +00:00