Modular C
C◼interface◼init snippet: identifiers inserted directly to an importer

If C◼interface◼init is imported explictly by a import directive, its snippet code is injected into the importer. More...

+ Collaboration diagram for C◼interface◼init snippet: identifiers inserted directly to an importer:

Functions

_Importerinit (_Importer *x, C◼size n)
 The default initializer is used if the corresponding slot is not filled by the importer. More...
 

Detailed Description

If C◼interface◼init is imported explictly by a import directive, its snippet code is injected into the importer.

Slots used by this snippet

This snippet may eventually use the name of the importing module as _Importer:

C◼interface◼init◼T |any type

This snippet has no slots

Function Documentation

§ init()

_Importer* init ( _Importer x,
C◼size  n 
)
inline

The default initializer is used if the corresponding slot is not filled by the importer.

Initialize n elements of type T.

Remarks
If x is a null pointer or if n is 0, noting is done.
Returns
x

Definition at line 51 of file C-snippet-init-_Snippet.c.

References _Importer, and C◼snippet◼init◼INITIALIZER.

51  {
52 #line 24 "/home/gustedt/build/cmod/C/C-snippet-init.X"
53  if (x) {
54 #line 25 "/home/gustedt/build/cmod/C/C-snippet-init.X"
55  for (C◼size i = 0; i < n; ++i) {
56 #line 26 "/home/gustedt/build/cmod/C/C-snippet-init.X"
58  }
59  }
60  return x;
61 }
#define _Importer(K, B, S)
A const safe binary search interface.
#define C◼snippet◼init◼INITIALIZER(...)
The default initializer.
C◼size C◼size
Definition: C-sizeptr.c:94