ccgtypes: improve internal documentation

This commit is contained in:
Araq
2018-10-02 19:33:29 +02:00
parent c2de135905
commit 7bac21ac23

View File

@@ -855,8 +855,10 @@ proc getTypeDesc(m: BModule, typ: PType): Rope =
result = getTypeDescAux(m, typ, check)
type
TClosureTypeKind = enum
clHalf, clHalfWithEnv, clFull
TClosureTypeKind = enum ## In C closures are mapped to 3 different things.
clHalf, ## fn(args) type without the trailing 'void* env' parameter
clHalfWithEnv, ## fn(args, void* env) type with trailing 'void* env' parameter
clFull ## struct {fn(args, void* env), env}
proc getClosureType(m: BModule, t: PType, kind: TClosureTypeKind): Rope =
assert t.kind == tyProc