Re: Writing triggers in C++ - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Writing triggers in C++
Date
Msg-id 200702140057.31743.peter_e@gmx.net
Whole thread Raw
In response to Writing triggers in C++  (Jacob Rief <jacob.rief@gmx.at>)
List pgsql-hackers
Jacob Rief wrote:
> Is there any convention how to rename such identifiers? If I would
> rename those identifiers (I simply would add an underscore to each of
> them), would such a patch be accepted and adopted onto one of the
> next releases?

Couldn't you do the required renamings as preprocessor macros, e.g.,

#define typename _typename
#include <postgres_stuff>
#undef typename

#include <c++_stuff>

your_code;


I would expect very little enthusiasm for making PostgreSQL code C++ 
safe.  There is already too much trouble keeping up with all the 
variants of C.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Fixing insecure security definer functions
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Use non-deprecated APIs for dynloader/darwin.c