Skip to content

Commit 33b005c

Browse files
Make content type an pointer_typet in refined_string_type
1 parent cf0f085 commit 33b005c

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

jbmc/src/java_bytecode/java_string_library_preprocess.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class java_string_library_preprocesst:public messaget
3737
java_string_library_preprocesst()
3838
: char_type(java_char_type()),
3939
index_type(java_int_type()),
40-
refined_string_type(index_type, char_type)
40+
refined_string_type(index_type, pointer_type(char_type))
4141
{
4242
}
4343

src/util/refined_string_type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Author: Romain Brenguier, [email protected]
2222

2323
refined_string_typet::refined_string_typet(
2424
const typet &index_type,
25-
const typet &content_type)
25+
const pointer_typet &content_type)
2626
{
2727
components().emplace_back("length", index_type);
2828
components().emplace_back("content", content_type);

src/util/refined_string_type.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ Author: Romain Brenguier, [email protected]
2626
class refined_string_typet: public struct_typet
2727
{
2828
public:
29-
refined_string_typet(const typet &index_type, const typet &char_type);
29+
refined_string_typet(
30+
const typet &index_type,
31+
const pointer_typet &content_type);
3032

3133
// Type for the content (list of characters) of a string
3234
const array_typet &get_content_type() const

src/util/string_expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class refined_string_exprt : public struct_exprt,
198198
: refined_string_exprt(
199199
_length,
200200
_content,
201-
refined_string_typet(_length.type(), _content.type()))
201+
refined_string_typet(_length.type(), to_pointer_type(_content.type())))
202202
{
203203
}
204204

0 commit comments

Comments
 (0)