[C++-SIG] Python calling C++ issues

Geoffrey Furnish furnish at actel.com
Wed Dec 1 17:54:39 CET 1999


David Beazley writes:
 > Duncan Grisby writes:
 > > 
 > > I haven't particularly followed the discussion, but I just want to
 > > point out that doing what you suggest is extremely dangerous. There is
 > > no guarantee that longs are the same size as pointers. 
 > 
 > With the notable exception of pointers to members, since when has a
 > long never been large enough to hold a pointer value?  Can you name a
 > specific instance where this doesn't work?  (or has the C++ standards
 > committee finally decided to break all pointers just for the hell of
 > it?)   SWIG does this internally and has never had any problems.

"Hasn't failed yet" is not the same as "works because it is intended
to work".  The right way to hold pointer values, is in objects of
pointer type.

-- 
Geoffrey Furnish            Actel Corporation        furnish at actel.com
Senior Staff Engineer      955 East Arques Ave       voice: 408-522-7528
Placement & Routing     Sunnyvale, CA   94086-4533   fax:   408-328-2303

"... because only those who write the code truly control the project."
						      -- Jamie Zawinski




More information about the Cplusplus-sig mailing list