Skip to content

Commit 80cefdd

Browse files
committed
Document macros in vec_template.c
1 parent 710ecb3 commit 80cefdd

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

mypyc/lib-rt/vecs/vec_template.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@
66
// as vec[i64] or vec[float]. Assume that certain #defines are provided that
77
// provide all the item type specific definitions:
88
//
9-
// VEC vec C type (e.g. VecI64)
9+
// VEC vec C type (e.g. VecI32)
10+
// VEC_TYPE boxed vec type object (e.g. VecI32Type)
11+
// VEC_OBJECT boxed Python object struct (e.g. VecI32Object)
12+
// BUF_OBJECT buffer Python object struct (e.g. VecI32BufObject)
13+
// BUF_TYPE buffer type object (e.g. VecI32BufType)
14+
// NAME(suffix) macro to create prefixed name with given suffix (e.g. VecI32##suffix)
15+
// FUNC(suffix) macro to create prefixed function name with suffix (e.g. VecI32_##suffix)
16+
// ITEM_TYPE_STR vec item type as C string literal (e.g. "i32")
17+
// ITEM_TYPE_MAGIC integer constant corresponding to the item type (e.g. VEC_ITEM_TYPE_I32)
18+
// ITEM_C_TYPE C type used for items (e.g. int32_t)
19+
// FEATURES capsule API struct name (e.g. Vec_I32API)
20+
// BOX_ITEM C function to box item (e.g. VecI32_BoxItem)
21+
// UNBOX_ITEM C function to unbox item (e.g. VecI32_UnboxItem)
22+
// IS_UNBOX_ERROR C function to check for unbox error (e.g. VecI32_IsUnboxError)
1023

1124
#ifndef VEC
1225
#error "VEC must be defined"

0 commit comments

Comments
 (0)