Browse Source

Restoring authorship annotation for <pyos@yandex-team.ru>. Commit 1 of 2.

pyos 3 years ago
parent
commit
ef985e41af

+ 4 - 4
contrib/libs/linuxvdso/fake.cpp

@@ -3,7 +3,7 @@
 size_t NVdso::Enumerate(TSymbol*, size_t) {
     return 0;
 }
-
-void* NVdso::Function(const char*, const char*) {
-    return nullptr;
-}
+ 
+void* NVdso::Function(const char*, const char*) { 
+    return nullptr; 
+} 

+ 19 - 19
contrib/libs/linuxvdso/interface.cpp

@@ -1,7 +1,7 @@
 #include "interface.h"
 #include "original/vdso_support.h"
 
-#ifdef HAVE_VDSO_SUPPORT
+#ifdef HAVE_VDSO_SUPPORT 
 
 size_t NVdso::Enumerate(TSymbol* s, size_t len) {
     if (!len) {
@@ -27,21 +27,21 @@ size_t NVdso::Enumerate(TSymbol* s, size_t len) {
 
     return n;
 }
-
-void* NVdso::Function(const char* name, const char* version) {
-    base::VDSOSupport::SymbolInfo info;
-    // Have to cast away the `const` to make this reinterpret_cast-able to a function pointer.
-    return base::VDSOSupport().LookupSymbol(name, version, STT_FUNC, &info) ? (void*) info.address : nullptr;
-}
-
-#else
-
-size_t NVdso::Enumerate(TSymbol*, size_t) {
-    return 0;
-}
-
-void* NVdso::Function(const char*, const char*) {
-    return nullptr;
-}
-
-#endif
+ 
+void* NVdso::Function(const char* name, const char* version) { 
+    base::VDSOSupport::SymbolInfo info; 
+    // Have to cast away the `const` to make this reinterpret_cast-able to a function pointer. 
+    return base::VDSOSupport().LookupSymbol(name, version, STT_FUNC, &info) ? (void*) info.address : nullptr; 
+} 
+ 
+#else 
+ 
+size_t NVdso::Enumerate(TSymbol*, size_t) { 
+    return 0; 
+} 
+ 
+void* NVdso::Function(const char*, const char*) { 
+    return nullptr; 
+} 
+ 
+#endif 

+ 2 - 2
contrib/libs/linuxvdso/interface.h

@@ -21,6 +21,6 @@ namespace NVdso {
     };
 
     size_t Enumerate(TSymbol* s, size_t len);
-
-    void* Function(const char* name, const char* version);
+ 
+    void* Function(const char* name, const char* version); 
 }

+ 1 - 1
contrib/libs/linuxvdso/original/elf_mem_image.cc

@@ -191,7 +191,7 @@ void ElfMemImage::Init(const void *base) {
   strsize_   = 0;
   verdefnum_ = 0;
   link_base_ = ~0L;  // Sentinel: PT_LOAD .p_vaddr can't possibly be this.
-  if (!base || base == kInvalidBase) {
+  if (!base || base == kInvalidBase) { 
     return;
   }
   const intptr_t base_as_uintptr_t = reinterpret_cast<uintptr_t>(base);

+ 11 - 11
contrib/libs/linuxvdso/original/vdso_support.cc

@@ -51,12 +51,12 @@
 
 namespace base {
 
-const void *VDSOSupport::vdso_base_ = NULL;
+const void *VDSOSupport::vdso_base_ = NULL; 
 
 VDSOSupport::VDSOSupport()
-    // If vdso_base_ is still set to NULL, we got here
+    // If vdso_base_ is still set to NULL, we got here 
     // before VDSOSupport::Init has been called. Call it now.
-    : image_(Init()) {
+    : image_(Init()) { 
 }
 
 // NOTE: we can't use GoogleOnceInit() below, because we can be
@@ -69,20 +69,20 @@ VDSOSupport::VDSOSupport()
 // Finally, even if there is a race here, it is harmless, because
 // the operation should be idempotent.
 const void *VDSOSupport::Init() {
-  if (vdso_base_ == NULL) {
+  if (vdso_base_ == NULL) { 
     // Valgrind zaps AT_SYSINFO_EHDR and friends from the auxv[]
     // on stack, and so glibc works as if VDSO was not present.
     // But going directly to kernel via /proc/self/auxv below bypasses
     // Valgrind zapping. So we check for Valgrind separately.
     if (RunningOnValgrind()) {
-      vdso_base_ = ElfMemImage::kInvalidBase;
-      return vdso_base_;
+      vdso_base_ = ElfMemImage::kInvalidBase; 
+      return vdso_base_; 
     }
     int fd = open("/proc/self/auxv", O_RDONLY);
     if (fd == -1) {
       // Kernel too old to have a VDSO.
-      vdso_base_ = ElfMemImage::kInvalidBase;
-      return vdso_base_;
+      vdso_base_ = ElfMemImage::kInvalidBase; 
+      return vdso_base_; 
     }
     ElfW(auxv_t) aux;
     while (read(fd, &aux, sizeof(aux)) == sizeof(aux)) {
@@ -94,16 +94,16 @@ const void *VDSOSupport::Init() {
       }
     }
     close(fd);
-    if (vdso_base_ == NULL) {
+    if (vdso_base_ == NULL) { 
       // Didn't find AT_SYSINFO_EHDR in auxv[].
-      vdso_base_ = ElfMemImage::kInvalidBase;
+      vdso_base_ = ElfMemImage::kInvalidBase; 
     }
   }
   return vdso_base_;
 }
 
 const void *VDSOSupport::SetBase(const void *base) {
-  CHECK(base != NULL);
+  CHECK(base != NULL); 
   const void *old_base = vdso_base_;
   vdso_base_ = base;
   image_.Init(base);

+ 2 - 2
contrib/libs/linuxvdso/original/vdso_support.h

@@ -114,8 +114,8 @@ class VDSOSupport {
 
   // Cached value of auxv AT_SYSINFO_EHDR, computed once.
   // This is a tri-state:
-  //              0   => value hasn't been determined yet.
-  //   kInvalidBase   => there is no VDSO.
+  //              0   => value hasn't been determined yet. 
+  //   kInvalidBase   => there is no VDSO. 
   //           else   => vma of VDSO Elf{32,64}_Ehdr.
   //
   // When testing with mock VDSO, low bit is set.

+ 1 - 1
contrib/python/PyYAML/py2/LICENSE

@@ -1,5 +1,5 @@
 Copyright (c) 2017-2021 Ingy döt Net
-Copyright (c) 2006-2016 Kirill Simonov
+Copyright (c) 2006-2016 Kirill Simonov 
 
 Permission is hereby granted, free of charge, to any person obtaining a copy of
 this software and associated documentation files (the "Software"), to deal in

+ 3 - 3
contrib/python/PyYAML/py2/yaml/representer.py

@@ -142,10 +142,10 @@ class BaseRepresenter(object):
 class SafeRepresenter(BaseRepresenter):
 
     def ignore_aliases(self, data):
-        if data is None:
-            return True
-        if isinstance(data, tuple) and data == ():
+        if data is None: 
             return True
+        if isinstance(data, tuple) and data == (): 
+            return True 
         if isinstance(data, (str, unicode, bool, int, float)):
             return True
 

+ 4 - 4
contrib/python/PyYAML/py2/yaml/resolver.py

@@ -24,10 +24,10 @@ class BaseResolver(object):
 
     def add_implicit_resolver(cls, tag, regexp, first):
         if not 'yaml_implicit_resolvers' in cls.__dict__:
-            implicit_resolvers = {}
-            for key in cls.yaml_implicit_resolvers:
-                implicit_resolvers[key] = cls.yaml_implicit_resolvers[key][:]
-            cls.yaml_implicit_resolvers = implicit_resolvers
+            implicit_resolvers = {} 
+            for key in cls.yaml_implicit_resolvers: 
+                implicit_resolvers[key] = cls.yaml_implicit_resolvers[key][:] 
+            cls.yaml_implicit_resolvers = implicit_resolvers 
         if first is None:
             first = [None]
         for ch in first:

+ 2 - 2
contrib/python/PyYAML/py2/yaml/scanner.py

@@ -291,7 +291,7 @@ class Scanner(object):
                     or self.index-key.index > 1024:
                 if key.required:
                     raise ScannerError("while scanning a simple key", key.mark,
-                            "could not find expected ':'", self.get_mark())
+                            "could not find expected ':'", self.get_mark()) 
                 del self.possible_simple_keys[level]
 
     def save_possible_simple_key(self):
@@ -318,7 +318,7 @@ class Scanner(object):
             
             if key.required:
                 raise ScannerError("while scanning a simple key", key.mark,
-                        "could not find expected ':'", self.get_mark())
+                        "could not find expected ':'", self.get_mark()) 
 
             del self.possible_simple_keys[self.flow_level]
 

Some files were not shown because too many files changed in this diff