#32818 closed task (fixed)

Standardise EXPOSE and INTERNAL macros to PRIVATE

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points: 0.2
Parent ID: #32798 Points: 0.5
Reviewer: nickm Sponsor:

Description

We should rename all our EXPOSE and INTERNAL macros to PRIVATE.

Then we can simplify the PRIVATE patterns in #32798 and #32522.

Child Tickets

Change History (3)

comment:1 Changed 10 months ago by teor

Actual Points: 0.2
Reviewer: nickm
Status: assignedneeds_review

I also standardised PRIVATE_ to PRIVATE.

The only unusual change is renaming CHANNEL_PRIVATE_ and TOR_CHANNEL_INTERNAL_ to CHANNEL_FILE_PRIVATE and CHANNEL_OBJECT_PRIVATE. Otherwise, they would have been ambiguous.

See my PR:

comment:2 Changed 10 months ago by teor

Here's how I searched for replacements:

$ grep -r '#.*if.*def.*[A-Z_]*\(INTERNAL\|EXPOSE\)[A-Z_]*' src | grep -v -e 'src/ext' -e 'include.am'
src/lib/err/backtrace.h:#ifdef EXPOSE_CLEAN_BACKTRACE
src/lib/err/backtrace.h:#endif /* defined(EXPOSE_CLEAN_BACKTRACE) */
...
src/core/or/channeltls.h:#ifdef TOR_CHANNEL_INTERNAL_
src/core/or/channeltls.h:#endif /* defined(TOR_CHANNEL_INTERNAL_) */
src/core/or/channel.h:#ifdef TOR_CHANNEL_INTERNAL_
src/core/or/channel.h:#endif /* defined(TOR_CHANNEL_INTERNAL_) */
...
src/feature/dirparse/routerparse.h:#ifdef EXPOSE_ROUTERDESC_TOKEN_TABLE
$ grep -r '#.*if.*def.*PRIVATE_' src | grep -v -e 'src/ext' -e 'include.am'
src/core/or/scheduler.h:#ifdef SCHEDULER_PRIVATE_
src/core/or/scheduler.h:#endif /* defined(SCHEDULER_PRIVATE_) */
src/core/or/channel.h:#ifdef CHANNEL_PRIVATE_
src/core/or/channel.h:#endif /* defined(CHANNEL_PRIVATE_) */

comment:3 Changed 10 months ago by nickm

Resolution: fixed
Status: needs_reviewclosed

lgtm; merged!

Note: See TracTickets for help on using tickets.