[vlc-devel] [PATCH] npapi: zero NPClass before using.

Sergey Radionov rsatom at gmail.com
Thu Dec 1 10:13:16 CET 2011


2011/12/1 Jean-Baptiste Kempf <jb at videolan.org>

> On Wed, Nov 30, 2011 at 10:53:28PM -0500, Rafaël Carré wrote :
> > > +    memset(static_cast<NPClass*>(this), 0, sizeof(NPClass));
> >
> > Why is that needed, doesn't C++ have default constructors?
> >
>
> NPClass, as its name says, is a struct.
>
maybe you will be a bit surprised, but in C++ structs have constructors :)


>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111201/fc23b406/attachment.html>


More information about the vlc-devel mailing list