[DVDnav-discuss] is "this" a valid c++ variable name?

Nico Sabbi Nicola.Sabbi at poste.it
Tue Jun 24 23:32:59 CEST 2008


Il Tuesday 24 June 2008 22:51:06 Benjamin Zores ha scritto:
> Andrea a écrit :
> > Hi,
> > 
> > either I am 100% stupid or "this" is not valid in c++ as a variable name.
> > 
> > this is line 293 of dvdnav.h
> > 
> > uint32_t dvdnav_describe_title_chapters(dvdnav_t *this, int32_t title, uint64_t **times, uint64_t 
> > *duration);
> > 
> > it is the only "this" in this file, all other arguments are called "self".
> > g++ 4.3.0 does not compile it
> > 
> > /usr/include/dvdnav/dvdnav.h:293: error: expected ‘,’ or ‘...’ before ‘this’
> > 
> > am I wrong?
> 
> You're right.
> I've been reported that VDR (which is C++) needs a patch for that to fix 
> this exact problem.
> 
> Ben

dvdnav is a C library, not C++. Anyway I'll welcome a patch
to rename "this" to "self"



More information about the DVDnav-discuss mailing list