[Baypiggies] ctypes presentation material online

Marilyn Davis marilyn at deliberate.com
Fri May 12 20:12:00 CEST 2006


On Fri, 12 May 2006, Tung Wai Yip wrote:

> Couldn't make it to the meeting. Thanks for sharing the experience with  
> ctype.
> 
> The risk of crashing seems so scary. Have you evaluated pywin32? I wonder  

Yeh.  Memory bugs are just terrible to find.

I once had one in C code where I was mallocing space for a new string:

buf = malloc(len(string + 1));

My eyeball looked at that a jillion times before I realized that I had
a misplaced ')' and it should be:

buf = malloc(len(string) + 1);

The problem is that it crashed much later, after I wrote to the space
(and overwrote the memory), and then it finally crashed in another
call to malloc.  This is typical.  Between the bug and the crash were
many many instructions and many many times of writing into malloc'ed
space.

Anyhow, Python, I kiss your feet, for taking this stuff out of my life.

Marilyn



> how they compare in the context of your project.
> 
> Wai Yip
> 
> > I have now posted my ctypes presentation material online linked at
> > http://www.spamai.com/present/  Format is zipped PDF, about 270 KB.
> >
> > This is the same URL as given in the baypiggies.net website describing  
> > the
> > talk so if you want to look this up later without saving this email, you
> > can find it there.
> >
> > The presentation posted contains material I did not discuss: prototypes  
> > for
> > several useful functions.
> 
> 
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> http://mail.python.org/mailman/listinfo/baypiggies
> 

-- 



More information about the Baypiggies mailing list