Skip to content

Buffer_get_type

hpgDesigns edited this page Aug 8, 2021 · 1 revision

Description

Gets the type of the given buffer and returns it.

Parameters

Parameter Data Type Description
buffer integer index of the buffer to get the type of

Return Values

integer: Returns the buffer constant of the buffer type.

Example Call

// demonstrates getting the type of a buffer
switch (buffer_get_type(mybuffer)) {
  case buffer_grow:
  // dynamically allocated buffer
  break;
  case buffer_fixed:
  // fixed size buffer
  break;
  default:
  // fast or wrap buffer
  break;
}

NOTOC

This is number 1

Clone this wiki locally