Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-11

Mysql without macros

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gärtner

Hi,

The mysqlconn.inc uses macros. This is unnecessary and has some disadvantages. Here is a patch that replaces the macros with simple type aliases. As far as I can see mysqlconn.inc is the same for fpc 2.3.1 and fpc 2.2.x, so the patch should work for both.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gärtner
Mattias Gärtner wrote
Hi, The mysqlconn.inc uses macros. This is unnecessary and has some disadvantages.

Namely, the lazarus codetools get confused :-)

Here is a patch that replaces the macros with simple type aliases.

Good idea...

As far as I can see mysqlconn.inc is the same for fpc 2.3.1 and fpc 2.2.x, so the patch should work for both.

Applied, and will merge to 2.2.3 so it gets included in 2.2.4.

That is, after I finished merging all my other patches...

Michael.

Reply by email

Mattias Gärtner
to Michael Van Canneyt

Zitat von Michael Van Canneyt :

Show quoted text 10 lines
On Fri, 14 Nov 2008, Mattias Gärtner wrote: > Hi, > > The mysqlconn.inc uses macros. This is unnecessary and has some disadvantages. Namely, the lazarus codetools get confused :-)

... and the users, that (mis)uses this code as example for coding. I think it is a great FPC feature, that the most native and platform independent language allows to code without macros (not only in theory).

Show quoted text 10 lines
> Here is a patch that replaces the macros with simple type aliases. Good idea... > As far as I can see mysqlconn.inc is the same for fpc 2.3.1 and fpc 2.2.x, > so the patch should work for both. Applied, and will merge to 2.2.3 so it gets included in 2.2.4. That is, after I finished merging all my other patches...

thanks,
Mattias

Reply by email

Michael Van Canneyt
to Mattias Gärtner
Mattias Gärtner wrote 16 lines
Zitat von Michael Van Canneyt : > > > On Fri, 14 Nov 2008, Mattias Gärtner wrote: > > > Hi, > > > > The mysqlconn.inc uses macros. This is unnecessary and has some > disadvantages. > > Namely, the lazarus codetools get confused :-) ... and the users, that (mis)uses this code as example for coding. I think it is a great FPC feature, that the most native and platform independent language allows to code without macros (not only in theory).

I agree 100% : I don't use the macros myself.

The remark was just there to show that I'd seen the bug report in the bugtracker.

Michael.

Reply by email