buffer_get_type

语法:

buffer_get_type(buffer);


参数 描述
buffer The index of the buffer to check.


返回: 常量


描述

With this function you retrieve the type of buffer that is beinf referenced by a buffer ID value. The return value will be one of the following constants:

常量 描述
buffer_fixed A buffer of fixed size.
buffer_grow A buffer that will "grow" dynamically as data is added
buffer_wrap A buffer where the data will "wrap". 当要添加的数据达到缓冲区大小的限制时,写入将回到缓冲区的开始位置,从那里将继续进行进一步的写入。
buffer_fast Special "stripped" buffer that is extremely fast to read/write to. Can only be used with buffer_u8 data types, and must be 1 byte aligned.
buffer_vbuffer


例如:

type = buffer_get_type(buff);

The above code will get the type of buffer from the value indexed in the variable "buff" and store it in a variable.