macro ISTREAM_CREATE()#
Macro to create an istream_h instance with specified buffer sizes, ensuring proper memory management and error handling.
Prototype
ISTREAM_CREATE(
var, istream_h *
gobj, hgobj
data_size, size_t
max_size, size_t
)
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Pointer to the |
|
|
Handle to the gobj that owns the istream. |
|
|
Initial buffer size for the istream. |
|
|
Maximum buffer size allowed for the istream. |
Return Value
None. The macro initializes var with a new istream_h instance or destroys an existing one before reinitialization.
Notes
If var is already allocated, it is destroyed before creating a new instance. The macro logs an error if var is not NULL before reallocation.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples