Is there a mechanism for suggesting a package to be added
toports?
Simon Barner
barner at in.tum.de
Thu Sep 2 08:47:19 PDT 2004
Anders Hanssen wrote:
> With 2.95 I got an error when compiling some template stuff in
> Cxx-API/include/Synopsis/Python/Object.hh, plus it got confused about struct
> sigaction and sigaction(2). Have no time to investigate the template
> problem, but the sigaction problem is solved with patch-ab. In addition, it
> needs patch-ac to include <algorithm> before using std::remove() and
> std::find() in Cxx-API/src/Path-posix.cc.
Anders,
thanks for testing :-)
AFAIK partial member spezialization on the return value of a method is
not supported with g++ 2.95.
Example (from synopsis-0.7/Cxx-API/include/Synopsis/Python/Object.hh)
// ...
class Object
{
// ...
public:
// ...
//. try to downcast to T, throw on failure
template <typename T>
static T narrow(Object) throw(TypeError);
// ...
};
template <typename T>
inline T Object::narrow(Object o) throw(Object::TypeError)
{
T retn(o.my_impl);
Py_INCREF(o.my_impl);
return retn;
}
// ...
template <typename T>
inline char Object::narrow(Object o) throw(Object::TypeError)
{
if (!PyString_Check(o.my_impl) || PyString_GET_SIZE(o.my_impl) != 1)
throw TypeError("object not a character");
char *value;
int length;
PyString_AsStringAndSize(o.my_impl, &value, &length);
return value[0];
}
// ...
So, I think the best is to make the port use gcc 3.3 on FreeBSD 4.x. Of
course it has to be checked whether synopsis compiled with gcc 3 works
with boehm-gc and python compiled with the system compiler (2.95.4).
I have uploaded an updated version of the port:
http://home.leo.org/~barner/freebsd/synopsis.tar.gz
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040902/b82253eb/attachment.bin
More information about the freebsd-ports
mailing list