All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH] Don't use c++ keyword in public header files
Date: Wed, 26 Jan 2011 10:58:45 +0100	[thread overview]
Message-ID: <1296035925.1520.102.camel@aeonflux> (raw)
In-Reply-To: <AANLkTi=DcdFHC1yUE16-gVvXzU9nz-rhdeErq3TwvwqQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

Hi Lucas,

> >> >> -                     const char *old, const char *new,
> >> >> +                     const char *p_old, const char *p_new,
> >> >>                       ofono_sim_lock_unlock_cb_t cb, void *data);
> >> >>       void (*lock)(struct ofono_sim *sim, enum ofono_sim_password_type type,
> >> >>                       int enable, const char *passwd,
> >> >
> >> > why is this exactly a problem?
> >>
> >> I did it only because the file contains this:
> >>
> >> #ifdef __cplusplus
> >> extern "C" {
> >> #endif
> >>
> >>
> >> So I thought someone might want to write a plugin in C++ or something
> >> that includes sim.h
> >
> > and at that point you told the compiler that it is C code and not C++
> > and it should be just fine.
> 
> This only works for the link phase, because of the name mangling in C++.
> 
> > I think it will compile just fine. Try to test it ;)
> 
> It doesn't. Example:

fair enough. Send a patch that uses one of the other proposed names. And
you might wanna update the atmodem and isimodem driver as well to just
be consistent.

Regards

Marcel



  reply	other threads:[~2011-01-26  9:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 11:47 [PATCH] Don't use c++ keyword in public header files Lucas De Marchi
2011-01-25 11:54 ` Marcel Holtmann
2011-01-25 14:42   ` Lucas De Marchi
2011-01-25 14:58     ` Marcel Holtmann
2011-01-25 15:11       ` Lucas De Marchi
2011-01-26  9:58         ` Marcel Holtmann [this message]
2011-01-26 16:15           ` Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296035925.1520.102.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.