Re: [fpc-devel] Some thoughts about TFPList
On Mon, 2 May 2005, pascalive wrote: I noticed that TFPList class was added in cvs version as a way to get rid of Notify performance penalty. I suggest to remove TFPList.Grow method since its only for Delphi compability (but Delphi doesnt have TFPlist) and AFAIK virtual methods add some degree of performance hit. I'd prefer to make it a normal static routine. Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Some thoughts about TFPList
Michael Van Canneyt wrote: On Mon, 2 May 2005, pascalive wrote: I noticed that TFPList class was added in cvs version as a way to get rid of Notify performance penalty. I suggest to remove TFPList.Grow method since its only for Delphi compability (but Delphi doesnt have TFPlist) and AFAIK virtual methods add some degree of performance hit. I'd prefer to make it a normal static routine. For me is good. Luiz ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Bug in TSQLQuery.ApplyRecUpdate
While trying to use mysql through sqldb i found some problems trying to apply the updates using TSqlQuery.ApplyUpdates: Database info: TableName = mysql_bench Table structure = CREATE TABLE `mysql_bench` (`AInt` int(11) default NULL,`AFloat` float(13,5) default NULL,`AStr` varchar(100) default NULL)TYPE=MyISAM; 1 - FTableName was storing the ; caracter if it's near to the tablename in sql query. For example Select * from ATable; - FTablename = 'ATable;' I fixed it with this sqldb.pp:699 - Move(PS^,FTableName[1],(P-PS-1)); but its buggy in the case there's no ; in the end 2- After fixing the table name i got the following: Sql executed through TSQLQuery.ApplyRecUpdate = insert into mysql_bench (AInt,AFloat,AStr) values (0,10,123456789,' '); Gives this error (also when used with a mysql management tool) An unhandled exception occurred at $0040F0DD : EDatabaseError : : Error executing query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right s yntax to use near '' at line 1 3- I noticed that could be the Float format so i added the following line in TSqlConnection.GetAsSQLText sqldb.pp:299 - ftFloat: Str(Double(Field.AsFloat),Result); Now the sql is insert into mysql_bench (AInt,AFloat,AStr) values (0,1.01234567890E+001,'a aaa'); But still gives the same error. Although the same sql can be executed with a mysql management tool. I hope this info can help resolve this bug Luiz ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] libc bugreport
Dear, I am evaluating fpc as a possible replacement compiler for a large kylix based source tree (~200.000 lines of code). In porting the apps I encountered some small troubles: * packages/base/libc/aineth.inc: inp argument of inet_aton should be var instead of in_addr pointer since the memory it refers to should exist and be valid at calling time. So why not let the compiler do the check for you? * packages/base/libc/nudph.inc : typo in libc.pp. It includes the file nupdh.inc (notice the swap of 'p' and 'd' chars), which contains no code. Maybe it is best that nupdh.inc is moved to the attic to avoid future mistakes. * packages/base/libc/nip.inc : iphdr and ip records have wrong size (24 bytes instead of 20). The first two C fields (version and ihl) are 4 bit integers contained in the first byte of the record. So instead of declaring flag0 as a word or dword, the type should be plain byte. * What about send and recv calls in ssocketh.inc? The buffer could be an untyped var instead of a regular pointer (Giving nil as buffer argument, although not prohibited by libc, makes no sense imho) kind regards, Z. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel