Skip to content

Commit b5c1b1a

Browse files
committed
fix style
1 parent fe4db6f commit b5c1b1a

File tree

8 files changed

+421
-217
lines changed

8 files changed

+421
-217
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
1+
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3+
#
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
8+
# data (collectively the "Software"), free of charge and under any and all
9+
# copyright rights in the Software, and any and all patent rights owned or
10+
# freely licensable by each licensor hereunder covering either (i) the
11+
# unmodified Software as contributed to or provided by such licensor, or (ii)
12+
# the Larger Works (as defined below), to deal in both
13+
#
14+
# (a) the Software, and
15+
#
16+
# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
17+
# one is included with the Software each a "Larger Work" to which the Software
18+
# is contributed by such licensors),
19+
#
20+
# without restriction, including without limitation the rights to copy, create
21+
# derivative works of, display, perform, and distribute the Software and make,
22+
# use, sell, offer for sale, import, export, have made, and have sold the
23+
# Software and the Larger Work(s), and to sublicense the foregoing rights on
24+
# either these or other terms.
25+
#
26+
# This license is subject to the following condition:
27+
#
28+
# The above copyright notice and either this complete permission notice or at a
29+
# minimum a reference to the UPL must be included in all copies or substantial
30+
# portions of the Software.
31+
#
32+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38+
# SOFTWARE.
39+
140
initialized = True
241
print("Hello world!")

graalpython/com.oracle.graal.python.frozen/freeze_modules.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, 2021, Oracle and/or its affiliates.
1+
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
22
# Copyright (C) 1996-2020 Python Software Foundation
33
#
44
# Licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
@@ -471,7 +471,8 @@ def trim(str):
471471
# write frozen files
472472

473473
FROZEN_MODULES_HEADER = """
474-
/* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
474+
/*
475+
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
475476
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
476477
*
477478
* The Universal Permissive License (UPL), Version 1.0

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,9 @@ Object run(VirtualFrame frame, String name, boolean withData,
595595
}
596596

597597
Object[] returnValues = new Object[]{
598-
data == null ? PNone.NONE : data,
599-
info.isPackage,
600-
info.origName == null ? PNone.NONE : info.origName
598+
data == null ? PNone.NONE : data,
599+
info.isPackage,
600+
info.origName == null ? PNone.NONE : info.origName
601601
};
602602

603603
return factory().createTuple(returnValues);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextUnicodeBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void initialize(Python3Core core) {
133133

134134
@Builtin(name = "PyUnicode_FromObject", minNumOfPositionalArgs = 1)
135135
@GenerateNodeFactory
136-
abstract static class PyUnicodeFromObjectNode extends PythonBuiltinNode {
136+
abstract static class PyUnicodeFromObjectNode extends PythonBuiltinNode {
137137
@Specialization
138138
public static String fromObject(String s) {
139139
return s;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/module/FrozenModules.java

Lines changed: 364 additions & 201 deletions
Large diffs are not rendered by default.

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/module/PythonFrozenModule.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ public final class PythonFrozenModule {
4949
private final boolean isPackage;
5050

5151
private static byte[] getByteCode(String symbol) {
52-
try {
53-
InputStream resourceAsStream = PythonFrozenModule.class.getResourceAsStream("Frozen" + symbol + ".bin");
54-
if (resourceAsStream != null) {
55-
return resourceAsStream.readAllBytes();
56-
}
57-
} catch (IOException e) {
58-
// fall-through
59-
}
60-
return null;
52+
try {
53+
InputStream resourceAsStream = PythonFrozenModule.class.getResourceAsStream("Frozen" + symbol + ".bin");
54+
if (resourceAsStream != null) {
55+
return resourceAsStream.readAllBytes();
56+
}
57+
} catch (IOException e) {
58+
// fall-through
59+
}
60+
return null;
6161
}
6262

6363
public PythonFrozenModule(String symbol, String name, boolean isPackage) {

graalpython/lib-graalpython/_imp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0

mx.graalpython/copyrights/overrides

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ graalpython/com.oracle.graal.python.cext/src/pystrhex.c,python.copyright
214214
graalpython/com.oracle.graal.python.cext/src/sliceobject.c,python.copyright
215215
graalpython/com.oracle.graal.python.cext/src/unicodectype.c,python.copyright
216216
graalpython/com.oracle.graal.python.cext/src/unicodetype_db.h,python.copyright
217+
graalpython/com.oracle.graal.python.frozen/freeze_modules.py,python.copyright
217218
graalpython/com.oracle.graal.python.jni/src/ctx_tracker.c,hpy.copyright
218219
graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java,zippy.copyright
219220
graalpython/com.oracle.graal.python.tck/src/com/oracle/graal/python/tck/resources/euler31.py,benchmarks.copyright

0 commit comments

Comments
 (0)