ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
[C++-sig] extracting a c++ object from a PyObject
by Francois Ostiguy other posts by this author
Feb 27 2003 6:47PM messages near this date
[C++-sig] Inherited instance variables | Re: [C++-sig] extracting a c++ object from a PyObject
This is a follow-up question to a recent thread.
Dave Abrahams provided the following code to extract a c++ object from a
PyObject

void f(PyObject* p) {

  handle<>  ph(borrowed(p));
  MyObj* op = extract<MyObj*> (object(ph));

}

this works beautifully, but appenrently fails in the case where MyObj
is a simple function. That is


typedef void (fcntptr*)();

void f(PyObject* p) {

  handle<>  ph(borrowed(p));
  fcntptr op = extract<fcntptr> (object(ph));

}

results in the following compilation error message.

/usr/local/include/boost/type_traits/add_cv.hpp:34: `const volatile'
qualifiers cannot be applied to `void ()()'

As always, any help/insight is greatly appreciated.

-Francois

----------------------------------------------------------------------------
Dr. Jean-Francois OSTIGUY                              voice: (630) 840-2231
Beam Physics Dept MS220                                  FAX: (630) 840-6039
Fermi National Accelerator Laboratory                email: ostiguy@[...].gov
Batavia IL 60510-0500                           WWW:www-ap.fnal.gov/~ostiguy



_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Francois Ostiguy
David Abrahams

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved