[FFmpeg-devel] _t POSIX namespace issues

Diego Biurrun diego
Sat Dec 13 19:16:09 CET 2008


On Sat, Dec 13, 2008 at 06:09:40PM +0000, M?ns Rullg?rd wrote:
> Diego Biurrun <diego at biurrun.de> writes:
> 
> > On Thu, Dec 11, 2008 at 09:31:43AM +0100, Diego Biurrun wrote:
> >> So names ending in _t are reserved by POSIX.  Nonetheless we have tons
> >> of them.  I thought about fixing these issues myself, but coming up with
> >> good new names is tedious, so I propose to have each maintainer address
> >> the problem in the files they maintain.  Here is a the result of a grep
> >> for problematic names with maintainers, in no particular order:
> >> 
> >> unmaintained:
> >> libavcodec/libxvidff.c:static int xvid_ff_2pass_create(xvid_plg_create_t * param,
> >> libavcodec/libxvidff.c:} xvid_context_t;
> >> libavcodec/libxvidff.c:    xvid_enc_create_t xvid_enc_create;
> >> libavcodec/libxvidff.c:    xvid_enc_frame_t xvid_enc_frame;
> >> libavcodec/libxvidff.c:    xvid_enc_plugin_t plugins[7];
> >> libavcodec/libxvidff.c:    xvid_enc_stats_t xvid_enc_stats;
> >> libavcodec/libxvidff.c:    xvid_gbl_init_t xvid_gbl_init;
> >> libavcodec/libxvidff.c:                                xvid_plg_data_t *param) {
> >> libavcodec/libxvidff.c:                                xvid_plg_destroy_t *param) {
> >> libavcodec/libxvidff.c:    xvid_plugin_single_t single;
> >> libavdevice/x11grab.c:} x11_grab_t;
> >
> > Patch attached.
> >
> > --- libavdevice/x11grab.c	(revision 16106)
> > +++ libavdevice/x11grab.c	(working copy)
> > @@ -55,7 +55,7 @@
> >  /**
> >   * X11 Device Demuxer context
> >   */
> > -typedef struct x11_grab_s
> > +struct x11_grab_s
> 
> I'd drop the _s suffix from the struct name while at it.  I can't
> think of anything resembling an argument for such a silly naming
> convention.  Structs have their own namespace, and the "struct"
> keyword should be clue enough that this is a struct.

OK, applied.

Diego




More information about the ffmpeg-devel mailing list