[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] module versioning and ISO types (size_t, ptr_diff_t, ...)
From:       Gerard Vermeulen <gvermeul () grenoble ! cnrs ! fr>
Date:       2004-01-21 19:06:24
Message-ID: 20040121200624.70001e47.gvermeul () grenoble ! cnrs ! fr
[Download RAW message or body]

Hi,

I am somewhat confused with respect to sip's new module version, like

%Module qtnetwork 0

In PyQt-3.10, this module has been extended with new classes. Since, its
interface has changed doesn't it mean that the 0 should be a 1?

In addition, comparing those version numbers
(I suppose that is the
                        /* Check the versions are compatible. */
                        if (im -> im_version >= 0 || em -> em_version >= 0)
                                if (im -> im_version != em -> em_version)
 in siplib.c)
is moderately useful, because if for instance PyQwt has been built for a qt
module that includes all features and it imports a qt module that has certain
features disabled, the 'import' and 'export' tables do not match, leading
to disaster. It also means that one is lucky if modules built on system X
work with modules built on system Y.

Wouldn't it be safer to calculate a hash number based on the class tables and/or
the function and method declarations? If the probability of collision between
the hash numbers is very small,  (im_hash == em_hash)  is a good test of
compatibility.

Secondly, I would make a case that sip passes ISO C types like size_t,
ptrdiff_t on from the sip specification files to the generated C++ code.
The reason is that size_t can be an 'unsigned int' (Linux) or an
'unsigned long' (HPUX).  Of course,  PyQwt could try to figure out
what type size_t exactly is, but if sip pretends to wrap C libraries
it may as well do it.

Gerard
  

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic