GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: update googletest to 50b8600 · nodejs/node@badbba2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • deps/googletest
    • include/gtest/internal
      • gtest-port.h
    • src
      • gtest-port.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/googletest/include/gtest/internal/gtest-port.h‎

Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-port.h
+17-10Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,9 +1385,9 @@ class GTEST_API_ Mutex {
13851385
Mutex();
13861386
~Mutex();
13871387

1388-
void Lock();
1388+
void lock();
13891389

1390-
void Unlock();
1390+
void unlock();
13911391

13921392
// Does nothing if the current thread holds the mutex. Otherwise, crashes
13931393
// with high probability.
@@ -1424,9 +1424,9 @@ class GTEST_API_ Mutex {
14241424
// "MutexLock l(&mu)". Hence the typedef trick below.
14251425
class GTestMutexLock {
14261426
public:
1427-
explicit GTestMutexLock(Mutex* mutex) : mutex_(mutex) { mutex_->Lock(); }
1427+
explicit GTestMutexLock(Mutex* mutex) : mutex_(mutex) { mutex_->lock(); }
14281428

1429-
~GTestMutexLock() { mutex_->Unlock(); }
1429+
~GTestMutexLock() { mutex_->unlock(); }
14301430

14311431
private:
14321432
Mutex* const mutex_;
@@ -1641,14 +1641,14 @@ class ThreadLocal : public ThreadLocalBase {
16411641
class MutexBase {
16421642
public:
16431643
// Acquires this mutex.
1644-
void Lock() {
1644+
void lock() {
16451645
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
16461646
owner_ = pthread_self();
16471647
has_owner_ = true;
16481648
}
16491649

16501650
// Releases this mutex.
1651-
void Unlock() {
1651+
void unlock() {
16521652
// Since the lock is being released the owner_ field should no longer be
16531653
// considered valid. We don't protect writing to has_owner_ here, as it's
16541654
// the caller's responsibility to ensure that the current thread holds the
@@ -1716,9 +1716,9 @@ class Mutex : public MutexBase {
17161716
// "MutexLock l(&mu)". Hence the typedef trick below.
17171717
class GTestMutexLock {
17181718
public:
1719-
explicit GTestMutexLock(MutexBase* mutex) : mutex_(mutex) { mutex_->Lock(); }
1719+
explicit GTestMutexLock(MutexBase* mutex) : mutex_(mutex) { mutex_->lock(); }
17201720

1721-
~GTestMutexLock() { mutex_->Unlock(); }
1721+
~GTestMutexLock() { mutex_->unlock(); }
17221722

17231723
private:
17241724
MutexBase* const mutex_;
@@ -1864,8 +1864,8 @@ class GTEST_API_ ThreadLocal {
18641864
class Mutex {
18651865
public:
18661866
Mutex() {}
1867-
void Lock() {}
1868-
void Unlock() {}
1867+
void lock() {}
1868+
void unlock() {}
18691869
void AssertHeld() const {}
18701870
};
18711871

@@ -2322,6 +2322,13 @@ const char* StringFromGTestEnv(const char* flag, const char* default_val);
23222322
} // namespace internal
23232323
} // namespace testing
23242324

2325+
#if GTEST_INTERNAL_HAVE_CPP_ATTRIBUTE(clang::annotate)
2326+
#define GTEST_INTERNAL_DEPRECATE_AND_INLINE(msg) \
2327+
[[deprecated(msg), clang::annotate("inline-me")]]
2328+
#else
2329+
#define GTEST_INTERNAL_DEPRECATE_AND_INLINE(msg) [[deprecated(msg)]]
2330+
#endif
2331+
23252332
#if defined(__cpp_lib_span) || (GTEST_INTERNAL_HAS_INCLUDE(<span>) && \
23262333
GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L)
23272334
#define GTEST_INTERNAL_HAS_STD_SPAN 1
Collapse file

‎deps/googletest/src/gtest-port.cc‎

Copy file name to clipboardExpand all lines: deps/googletest/src/gtest-port.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,13 @@ Mutex::~Mutex() {
320320
}
321321
}
322322

323-
void Mutex::Lock() {
323+
void Mutex::lock() {
324324
ThreadSafeLazyInit();
325325
::EnterCriticalSection(critical_section_);
326326
owner_thread_id_ = ::GetCurrentThreadId();
327327
}
328328

329-
void Mutex::Unlock() {
329+
void Mutex::unlock() {
330330
ThreadSafeLazyInit();
331331
// We don't protect writing to owner_thread_id_ here, as it's the
332332
// caller's responsibility to ensure that the current thread holds the

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.