Skip to content

Commit ec14ef7

Browse files
Update Ubuntu job name in Azure pipeline and add string variable creation in C API example
1 parent 95d2e00 commit ec14ef7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
- template: scripts/generate-doc.yml
100100

101101

102-
- job: "Ubuntu20OCamlStatic"
102+
- job: "UbuntuOCamlStatic"
103103
displayName: "Ubuntu with OCaml on z3-static"
104104
pool:
105105
vmImage: "Ubuntu-latest"

examples/c/test_capi.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ Z3_ast mk_int_var(Z3_context ctx, const char * name)
165165
return mk_var(ctx, name, ty);
166166
}
167167

168+
/**
169+
\brief Create a string variable using the given name.
170+
*/
171+
Z3_ast mk_string_var(Z3_context ctx, const char * name)
172+
{
173+
Z3_sort ty = Z3_mk_string_sort(ctx);
174+
return mk_var(ctx, name, ty);
175+
}
176+
168177
/**
169178
\brief Create a Z3 integer node using a C int.
170179
*/
@@ -1615,7 +1624,7 @@ void error_code_example2() {
16151624
Z3_del_config(cfg);
16161625

16171626
x = mk_int_var(ctx, "x");
1618-
y = mk_bool_var(ctx, "y");
1627+
y = mk_string_var(ctx, "y");
16191628
printf("before Z3_mk_iff\n");
16201629
/* the next call will produce an error */
16211630
app = Z3_mk_iff(ctx, x, y);

0 commit comments

Comments
 (0)