Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Sep 2004 17:47:28 +0200
From:      Simon Barner <barner@in.tum.de>
To:        Anders Hanssen <anders@wax.nu>
Cc:        Vicki Brown <vlb@cfcl.com>
Subject:   Re: Is there a mechanism for suggesting a package to be added toports?
Message-ID:  <20040902154728.GB65650@zi025.glhnet.mhn.de>
In-Reply-To: <016201c490e9$c2aca2d0$6a00a8c0@glorfindel>
References:  <p061104d6bd5be87e6e7e@[10.1.1.144]> <20040902094643.GA65650@zi025.glhnet.mhn.de> <016201c490e9$c2aca2d0$6a00a8c0@glorfindel>

next in thread | previous in thread | raw e-mail | index | archive | help

--8GpibOaaTibBMecb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--8GpibOaaTibBMecb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (FreeBSD)

iD8DBQFBN0CQCkn+/eutqCoRAsZ5AKCGCrmF43eD04Ypl47T0EbifmYHnwCgqCAf
jQwVnURUTn9DbZGiRIxbnE4=
=S1Le
-----END PGP SIGNATURE-----

--8GpibOaaTibBMecb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040902154728.GB65650>