summaryrefslogtreecommitdiffhomepage
path: root/docs/cpque_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-05-22 20:52:18 +0200
committerTyge Løvset <[email protected]>2022-05-22 20:52:18 +0200
commit1c3e7b683469904d224f3f8f1ee0096f1c5b1b9d (patch)
tree826ca6560cd952996eb9793cb3356a9791753f2e /docs/cpque_api.md
parent314a41be6b39b6c5967d79555dbf018dbc7eb5f6 (diff)
downloadSTC-modified-1c3e7b683469904d224f3f8f1ee0096f1c5b1b9d.tar.gz
STC-modified-1c3e7b683469904d224f3f8f1ee0096f1c5b1b9d.zip
Changed c_apply(v, ..) macro to make it more consistent with c_apply_arr(v, ..) and c_foreach (i, ..): v changed to a pointer - not value.
Note: also c_pair(v) is changed correspondingly, so usage with c_apply(v) is unchanged.
Diffstat (limited to 'docs/cpque_api.md')
-rw-r--r--docs/cpque_api.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/cpque_api.md b/docs/cpque_api.md
index 1842c1b6..d9a381cc 100644
--- a/docs/cpque_api.md
+++ b/docs/cpque_api.md
@@ -78,7 +78,7 @@ int main()
// Push ten million random numbers to priority queue, plus some negative ones.
c_forrange (N)
cpque_i_push(&heap, stc64_uniform(&rng, &dist));
- c_apply(v, cpque_i_push(&heap, v), int, {-231, -32, -873, -4, -343});
+ c_apply(v, cpque_i_push(&heap, *v), int, {-231, -32, -873, -4, -343});
// Extract and display the fifty smallest.
c_forrange (50) {