Skip to content

Commit aa3f5bb

Browse files
committed
style fixes: fixed (c) headers
1 parent 76b6d7c commit aa3f5bb

File tree

5 files changed

+79
-12
lines changed

5 files changed

+79
-12
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinFunctions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public boolean callable(PythonCallable callable) {
203203

204204
@Specialization
205205
public boolean callable(Object object,
206-
@Cached("create()") LookupInheritedAttributeNode getAttributeNode) {
206+
@Cached("create()") LookupInheritedAttributeNode getAttributeNode) {
207207
/**
208208
* Added temporarily to skip translation/execution errors in unit testing
209209
*/

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/FaulthandlerModuleBuiltins.java

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,40 @@
11
/*
22
* Copyright (c) 2018, Oracle and/or its affiliates.
33
*
4-
* All rights reserved.
4+
* The Universal Permissive License (UPL), Version 1.0
5+
*
6+
* Subject to the condition set forth below, permission is hereby granted to any
7+
* person obtaining a copy of this software, associated documentation and/or data
8+
* (collectively the "Software"), free of charge and under any and all copyright
9+
* rights in the Software, and any and all patent rights owned or freely
10+
* licensable by each licensor hereunder covering either (i) the unmodified
11+
* Software as contributed to or provided by such licensor, or (ii) the Larger
12+
* Works (as defined below), to deal in both
13+
*
14+
* (a) the Software, and
15+
* (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
16+
* one is included with the Software (each a "Larger Work" to which the
17+
* Software is contributed by such licensors),
18+
*
19+
* without restriction, including without limitation the rights to copy, create
20+
* derivative works of, display, perform, and distribute the Software and make,
21+
* use, sell, offer for sale, import, export, have made, and have sold the
22+
* Software and the Larger Work(s), and to sublicense the foregoing rights on
23+
* either these or other terms.
24+
*
25+
* This license is subject to the following condition:
26+
*
27+
* The above copyright notice and either this complete permission notice or at a
28+
* minimum a reference to the UPL must be included in all copies or substantial
29+
* portions of the Software.
30+
*
31+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37+
* SOFTWARE.
538
*/
639
package com.oracle.graal.python.builtins.modules;
740

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/MathModuleBuiltins.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -691,14 +691,14 @@ private double defaultAbs() {
691691
return 0.0;
692692
}
693693

694-
private boolean isCloseDouble(double a, double b, double rel_tol, double abs_tol) {
695-
double diff ;
694+
private boolean isCloseDouble(double a, double b, double rel_tol, double abs_tol) {
695+
double diff;
696696

697-
if (rel_tol < 0.0 || abs_tol < 0.0 ) {
697+
if (rel_tol < 0.0 || abs_tol < 0.0) {
698698
throw raise(ValueError, "tolerances must be non-negative");
699699
}
700700

701-
if ( a == b ) {
701+
if (a == b) {
702702
return true;
703703
}
704704

@@ -708,8 +708,8 @@ private boolean isCloseDouble(double a, double b, double rel_tol, double abs_to
708708

709709
diff = Math.abs(b - a);
710710
return (((diff <= Math.abs(rel_tol * b)) ||
711-
(diff <= Math.abs(rel_tol * a))) ||
712-
(diff <= abs_tol));
711+
(diff <= Math.abs(rel_tol * a))) ||
712+
(diff <= abs_tol));
713713
}
714714

715715
@Specialization
@@ -728,7 +728,7 @@ public boolean isClose(double a, double b, double rel_tol, PNone abs_tol) {
728728
}
729729

730730
@Specialization
731-
public boolean isClose(double a, double b, double rel_tol, double abs_tol) {
731+
public boolean isClose(double a, double b, double rel_tol, double abs_tol) {
732732
return isCloseDouble(a, b, rel_tol, abs_tol);
733733
}
734734
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cpyobject/PyObjectByteBuiltins.java

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,40 @@
11
/*
22
* Copyright (c) 2018, Oracle and/or its affiliates.
33
*
4-
* All rights reserved.
4+
* The Universal Permissive License (UPL), Version 1.0
5+
*
6+
* Subject to the condition set forth below, permission is hereby granted to any
7+
* person obtaining a copy of this software, associated documentation and/or data
8+
* (collectively the "Software"), free of charge and under any and all copyright
9+
* rights in the Software, and any and all patent rights owned or freely
10+
* licensable by each licensor hereunder covering either (i) the unmodified
11+
* Software as contributed to or provided by such licensor, or (ii) the Larger
12+
* Works (as defined below), to deal in both
13+
*
14+
* (a) the Software, and
15+
* (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
16+
* one is included with the Software (each a "Larger Work" to which the
17+
* Software is contributed by such licensors),
18+
*
19+
* without restriction, including without limitation the rights to copy, create
20+
* derivative works of, display, perform, and distribute the Software and make,
21+
* use, sell, offer for sale, import, export, have made, and have sold the
22+
* Software and the Larger Work(s), and to sublicense the foregoing rights on
23+
* either these or other terms.
24+
*
25+
* This license is subject to the following condition:
26+
*
27+
* The above copyright notice and either this complete permission notice or at a
28+
* minimum a reference to the UPL must be included in all copies or substantial
29+
* portions of the Software.
30+
*
31+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37+
* SOFTWARE.
538
*/
639
package com.oracle.graal.python.builtins.objects.cpyobject;
740

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/floats/FloatBuiltins.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,11 @@ private String getDetectedEndianess() {
883883
ByteOrder byteOrder = ByteOrder.nativeOrder();
884884
if (byteOrder.equals(ByteOrder.BIG_ENDIAN)) {
885885
return "IEEE, big-endian";
886-
} else if(byteOrder.equals(ByteOrder.LITTLE_ENDIAN)) {
886+
} else if (byteOrder.equals(ByteOrder.LITTLE_ENDIAN)) {
887887
return "IEEE, little-endian";
888888
}
889-
} catch (Error ignored) {}
889+
} catch (Error ignored) {
890+
}
890891
return "unknown";
891892
}
892893

0 commit comments

Comments
 (0)