equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
163 (void)readBytes(stream, &val, sizeof(val)); |
163 (void)readBytes(stream, &val, sizeof(val)); |
164 return JAVA_TO_HOST_DOUBLE(val); |
164 return JAVA_TO_HOST_DOUBLE(val); |
165 } |
165 } |
166 |
166 |
167 /* |
167 /* |
|
168 * Read a module from the stream. The ID used in the wire protocol |
|
169 * is converted to a reference which is returned. The reference is |
|
170 * global and strong, but it should *not* be deleted by the caller |
|
171 * since it is freed when this stream is destroyed. |
|
172 */ |
|
173 jobject |
|
174 inStream_readModuleRef(JNIEnv *env, PacketInputStream *stream) |
|
175 { |
|
176 jobject ref = inStream_readObjectRef(env, stream); |
|
177 if (ref == NULL && stream->error == JDWP_ERROR(INVALID_OBJECT)) { |
|
178 stream->error = JDWP_ERROR(INVALID_MODULE); |
|
179 return NULL; |
|
180 } |
|
181 |
|
182 return ref; |
|
183 } |
|
184 |
|
185 /* |
168 * Read an object from the stream. The ID used in the wire protocol |
186 * Read an object from the stream. The ID used in the wire protocol |
169 * is converted to a reference which is returned. The reference is |
187 * is converted to a reference which is returned. The reference is |
170 * global and strong, but it should *not* be deleted by the caller |
188 * global and strong, but it should *not* be deleted by the caller |
171 * since it is freed when this stream is destroyed. |
189 * since it is freed when this stream is destroyed. |
172 */ |
190 */ |