> -----Original Message-----
> From: Dmitry Yemanov [mailto:firebi...@yandex.ru] 
> Sent: Sábado, 14 de Abril de 2012 1:26
> 
> Claudio,
> 
> > Hello, for a long time I've been thinking in creating a 
> TxnType (or whatever
> > name) to hold the type of a transaction, so it could be changed for
> > experimentation in the future. This type would be ULONG for 
> now (although I
> > found some cases where we still use SLONG).
> 
> We have *a lot* of places where it's still SLONG. So I'd start with 
> making it globally unsigned.

Things get really interesting with code like this:

class RelationPages
{
public:
        vcl*    rel_pages;                      // vector of pointer page
numbers
        SLONG   rel_instance_id;        // 0 or att_attachment_id or
tra_number

Attachment's id and related functions use SLONG and maybe they don't need
more, but the same var can contain tra id. And then

// global temporary relations attributes
RelationPages* getPages(thread_db* tdbb, SLONG tran = -1, bool allocPages =
true);
....
bool                    delPages(thread_db* tdbb, SLONG tran = -1,
RelationPages* aPages = 0);

Those functions use -1 to indicate a special condition.

I can attempt the change to unsigned, but I don't know if Firebird will
explode in flames.
;-)

C.


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to