Skip to content

Conversation

@ywkaras
Copy link
Contributor

@ywkaras ywkaras commented Jul 12, 2023

Renames all plugin and example files with .c extension to have .cc extensions. Fix resulting errors.

@ywkaras ywkaras self-assigned this Jul 12, 2023
@ywkaras ywkaras added the TS API label Jul 12, 2023
@ywkaras ywkaras added this to the 10.0.0 milestone Jul 12, 2023
@ywkaras ywkaras force-pushed the tsapi_obs branch 2 times, most recently from fcd2c77 to 1b6095a Compare July 12, 2023 22:23
@ywkaras ywkaras marked this pull request as draft July 12, 2023 22:26
@ywkaras ywkaras force-pushed the tsapi_obs branch 13 times, most recently from 5ea11bf to 2a1c65d Compare July 19, 2023 23:18
@ywkaras ywkaras force-pushed the tsapi_obs branch 5 times, most recently from 35bf59e to 022952b Compare July 24, 2023 19:57
@ywkaras ywkaras marked this pull request as ready for review July 24, 2023 21:52
@bryancall bryancall requested a review from vmamidi July 24, 2023 22:18
time(&t);
e = (NULL == expire ? 0 : strtol(expire, NULL, 16));
i = TSREMAP_DID_REMAP;
e = (NULL == expire ? 0 : strtol(expire, NULL, 16));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed nullptr?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I addressed all of these I think in a new (big) commit.

@@ -147,959 +157,1360 @@ extern "C" {
#endif

#ifndef TS_DEPRECATED
#define TS_DEPRECATED __attribute__((deprecated))
#define TS_DEPRECATED [[deprecated]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably remove this and do the substitution. This was done initially because of OS dependencies, but now it's part of C++.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whacked.


*/
#define TS_NULL_MLOC ((TSMLoc)0)
extern "C" void TSPluginInit(int argc, const char *argv[]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make a comment that this is "C" because it's looked up by name and not implicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above line 1518.

@bneradt bneradt requested a review from cmcfarlen August 14, 2023 22:33
Renames all plugin and example files with .c extension to have .cc extensions,
Fix resulting errors.
Minimize use of preprocessor.
Change typedefs to 'using'.
Updates to documentation.
Put current TS API declarations in tsapi::c namespace.
Limit impact to current code with 'using namespace tsapi::c'.
Remove TS_DEPRECATED in apidefs.h.
@ywkaras
Copy link
Contributor Author

ywkaras commented Aug 15, 2023

I recommend reviewing this with whitespace-only changes hidden. I introduced a nested namespace around existing declarations, and clang format insists on indenting the declarations.

@ywkaras ywkaras merged commit 62dd1b9 into apache:master Aug 15, 2023
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jun 3, 2024
* asf/master: (221 commits)
  LSan: Fix leak of test_Metrics (apache#10179)
  LSan: Fix memory leak of test_EventSystem (apache#10178)
  LSan: Fix memory leak of test_X509HostnameValidator (apache#10161)
  Remove cqtx log field (apache#10111)
  Require ATS plugins to be compiled with C++17. (apache#10007)
  Fix conf_remap plugin build on macOS (apache#10177)
  libswoc: Update to 1.5.4 (apache#10155)
  Makes cmake build again, on macOS (apache#10172)
  Check SNI in h3 (apache#10184)
  Remove autoconf headers during CMake configuration (apache#10173)
  test_QUICLossDetector.cc: Add back get_hrtime() (apache#10185)
  ink_ink_get_hrtime -> ink_get_hrtime (apache#10182)
  mgmt: make libconfigmanager a true static library (apache#10181)
  Make sure that the thread local time is updated timely (apache#10163)
  Unrequire remap rules for OCSP (apache#10146)
  cache_range test performance improvement (apache#10170)
  Clean up certifier plugin debug messages. (apache#9975)
  cmake: add check for clock_gettime (apache#10169)
  Remove Http3NoError allocations (apache#10165)
  Fix Throttler initialization. (apache#10154)
  ...
@bryancall bryancall mentioned this pull request Aug 14, 2024
91 tasks
@bryancall bryancall changed the title Require ATS plugins to be compiled with C++17. Require ATS plugins to be compiled with C++17 Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants