Skip to content

Commit 2ec1da8

Browse files
author
Matthias Güdemann
committed
Add getter/setter for ID_is_native_method
1 parent 3b1237c commit 2ec1da8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,7 @@ void java_bytecode_convert_method_lazy(
372372
member_type.set(ID_is_synchronized, true);
373373
if(m.is_static)
374374
member_type.set(ID_is_static, true);
375-
if(m.is_native)
376-
member_type.set(ID_is_native_method, true);
375+
member_type.set_native(m.is_native);
377376

378377
if(m.is_bridge)
379378
member_type.set(ID_is_bridge_method, m.is_bridge);

jbmc/src/java_bytecode/java_types.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,16 @@ class java_method_typet : public code_typet
288288
{
289289
set(ID_final, is_final);
290290
}
291+
292+
bool get_native() const
293+
{
294+
return get_bool(ID_is_native_method);
295+
}
296+
297+
void set_native(bool is_native)
298+
{
299+
set(ID_is_native_method, is_native);
300+
}
291301
};
292302

293303
template <>

0 commit comments

Comments
 (0)