php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
spl_heap.c File Reference
#include "php.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#include "spl_heap.h"
#include "spl_heap_arginfo.h"
#include "spl_exceptions.h"
#include "spl_functions.h"

Go to the source code of this file.

Data Structures

struct  _spl_ptr_heap
 
struct  _spl_heap_object
 
struct  _spl_pqueue_elem
 

Macros

#define PTR_HEAP_BLOCK_SIZE   64
 
#define SPL_HEAP_CORRUPTED   0x00000001
 
#define SPL_HEAP_WRITE_LOCKED   0x00000002
 
#define Z_SPLHEAP_P(zv)
 

Typedefs

typedef void(* spl_ptr_heap_dtor_func) (void *)
 
typedef void(* spl_ptr_heap_ctor_func) (void *)
 
typedef int(* spl_ptr_heap_cmp_func) (void *, void *, zval *)
 
typedef struct _spl_ptr_heap spl_ptr_heap
 
typedef struct _spl_heap_object spl_heap_object
 
typedef struct _spl_heap_it spl_heap_it
 
typedef struct _spl_pqueue_elem spl_pqueue_elem
 

Functions

 PHP_METHOD (SplHeap, count)
 
 PHP_METHOD (SplHeap, isEmpty)
 
 PHP_METHOD (SplHeap, insert)
 
 PHP_METHOD (SplHeap, extract)
 
 PHP_METHOD (SplPriorityQueue, insert)
 
 PHP_METHOD (SplPriorityQueue, extract)
 
 PHP_METHOD (SplPriorityQueue, top)
 
 PHP_METHOD (SplPriorityQueue, setExtractFlags)
 
 PHP_METHOD (SplPriorityQueue, getExtractFlags)
 
 PHP_METHOD (SplHeap, recoverFromCorruption)
 
 PHP_METHOD (SplHeap, isCorrupted)
 
 PHP_METHOD (SplPriorityQueue, compare)
 
 PHP_METHOD (SplHeap, top)
 
 PHP_METHOD (SplMinHeap, compare)
 
 PHP_METHOD (SplMaxHeap, compare)
 
 PHP_METHOD (SplHeap, key)
 
 PHP_METHOD (SplHeap, next)
 
 PHP_METHOD (SplHeap, valid)
 
 PHP_METHOD (SplHeap, rewind)
 
 PHP_METHOD (SplHeap, current)
 
 PHP_METHOD (SplPriorityQueue, current)
 
 PHP_METHOD (SplHeap, __debugInfo)
 
 PHP_METHOD (SplPriorityQueue, __debugInfo)
 
memcpyspl_handler_SplHeap (zend_object_handlers)
 
memcpyspl_handler_SplPriorityQueue (zend_object_handlers)
 

Variables

PHPAPI zend_class_entryspl_ce_SplHeap
 
PHPAPI zend_class_entryspl_ce_SplMaxHeap = register_class_SplMaxHeap(spl_ce_SplHeap)
 
PHPAPI zend_class_entryspl_ce_SplMinHeap = register_class_SplMinHeap(spl_ce_SplHeap)
 
PHPAPI zend_class_entryspl_ce_SplPriorityQueue = register_class_SplPriorityQueue(zend_ce_iterator, zend_ce_countable)
 
spl_ce_SplHeap create_object = spl_heap_object_new
 
spl_ce_SplHeap default_object_handlers = &spl_handler_SplHeap
 
spl_ce_SplHeap get_iterator = spl_heap_get_iterator
 
spl_handler_SplHeap offset = XtOffsetOf(spl_heap_object, std)
 
spl_handler_SplHeap clone_obj = spl_heap_object_clone
 
spl_handler_SplHeap count_elements = spl_heap_object_count_elements
 
spl_handler_SplHeap get_gc = spl_heap_object_get_gc
 
spl_handler_SplHeap free_obj = spl_heap_object_free_storage
 
return SUCCESS
 

Macro Definition Documentation

◆ PTR_HEAP_BLOCK_SIZE

#define PTR_HEAP_BLOCK_SIZE   64

Definition at line 30 of file spl_heap.c.

◆ SPL_HEAP_CORRUPTED

#define SPL_HEAP_CORRUPTED   0x00000001

Definition at line 32 of file spl_heap.c.

◆ SPL_HEAP_WRITE_LOCKED

#define SPL_HEAP_WRITE_LOCKED   0x00000002

Definition at line 33 of file spl_heap.c.

◆ Z_SPLHEAP_P

#define Z_SPLHEAP_P ( zv)
Value:
spl_heap_from_obj(Z_OBJ_P((zv)))
zval * zv
Definition ffi.c:3975
#define Z_OBJ_P(zval_p)
Definition zend_types.h:990

Definition at line 80 of file spl_heap.c.

Typedef Documentation

◆ spl_heap_it

typedef struct _spl_heap_it spl_heap_it

Definition at line 60 of file spl_heap.c.

◆ spl_heap_object

Definition at line 59 of file spl_heap.c.

◆ spl_pqueue_elem

◆ spl_ptr_heap

typedef struct _spl_ptr_heap spl_ptr_heap

◆ spl_ptr_heap_cmp_func

typedef int(* spl_ptr_heap_cmp_func) (void *, void *, zval *)

Definition at line 46 of file spl_heap.c.

◆ spl_ptr_heap_ctor_func

typedef void(* spl_ptr_heap_ctor_func) (void *)

Definition at line 45 of file spl_heap.c.

◆ spl_ptr_heap_dtor_func

typedef void(* spl_ptr_heap_dtor_func) (void *)

Definition at line 44 of file spl_heap.c.

Function Documentation

◆ PHP_METHOD() [1/23]

PHP_METHOD ( SplHeap ,
__debugInfo  )

Definition at line 1059 of file spl_heap.c.

◆ PHP_METHOD() [2/23]

PHP_METHOD ( SplHeap ,
count  )

Definition at line 578 of file spl_heap.c.

◆ PHP_METHOD() [3/23]

PHP_METHOD ( SplHeap ,
current  )

Definition at line 1023 of file spl_heap.c.

◆ PHP_METHOD() [4/23]

PHP_METHOD ( SplHeap ,
extract  )

Definition at line 644 of file spl_heap.c.

◆ PHP_METHOD() [5/23]

PHP_METHOD ( SplHeap ,
insert  )

Definition at line 621 of file spl_heap.c.

◆ PHP_METHOD() [6/23]

PHP_METHOD ( SplHeap ,
isCorrupted  )

Definition at line 816 of file spl_heap.c.

◆ PHP_METHOD() [7/23]

PHP_METHOD ( SplHeap ,
isEmpty  )

Definition at line 593 of file spl_heap.c.

◆ PHP_METHOD() [8/23]

PHP_METHOD ( SplHeap ,
key  )

Definition at line 974 of file spl_heap.c.

◆ PHP_METHOD() [9/23]

PHP_METHOD ( SplHeap ,
next  )

Definition at line 987 of file spl_heap.c.

◆ PHP_METHOD() [10/23]

PHP_METHOD ( SplHeap ,
recoverFromCorruption  )

Definition at line 799 of file spl_heap.c.

◆ PHP_METHOD() [11/23]

PHP_METHOD ( SplHeap ,
rewind  )

Definition at line 1013 of file spl_heap.c.

◆ PHP_METHOD() [12/23]

PHP_METHOD ( SplHeap ,
top  )

Definition at line 844 of file spl_heap.c.

◆ PHP_METHOD() [13/23]

PHP_METHOD ( SplHeap ,
valid  )

Definition at line 1000 of file spl_heap.c.

◆ PHP_METHOD() [14/23]

PHP_METHOD ( SplMaxHeap ,
compare  )

Definition at line 884 of file spl_heap.c.

◆ PHP_METHOD() [15/23]

PHP_METHOD ( SplMinHeap ,
compare  )

Definition at line 871 of file spl_heap.c.

◆ PHP_METHOD() [16/23]

PHP_METHOD ( SplPriorityQueue ,
__debugInfo  )

Definition at line 1069 of file spl_heap.c.

◆ PHP_METHOD() [17/23]

PHP_METHOD ( SplPriorityQueue ,
compare  )

Definition at line 831 of file spl_heap.c.

◆ PHP_METHOD() [18/23]

PHP_METHOD ( SplPriorityQueue ,
current  )

Definition at line 1041 of file spl_heap.c.

◆ PHP_METHOD() [19/23]

PHP_METHOD ( SplPriorityQueue ,
extract  )

Definition at line 708 of file spl_heap.c.

◆ PHP_METHOD() [20/23]

PHP_METHOD ( SplPriorityQueue ,
getExtractFlags  )

Definition at line 784 of file spl_heap.c.

◆ PHP_METHOD() [21/23]

PHP_METHOD ( SplPriorityQueue ,
insert  )

Definition at line 666 of file spl_heap.c.

◆ PHP_METHOD() [22/23]

PHP_METHOD ( SplPriorityQueue ,
setExtractFlags  )

Definition at line 762 of file spl_heap.c.

◆ PHP_METHOD() [23/23]

PHP_METHOD ( SplPriorityQueue ,
top  )

Definition at line 734 of file spl_heap.c.

◆ spl_handler_SplHeap()

memcpy & spl_handler_SplHeap ( zend_object_handlers )

◆ spl_handler_SplPriorityQueue()

memcpy & spl_handler_SplPriorityQueue ( zend_object_handlers )

Variable Documentation

◆ clone_obj

spl_handler_SplPriorityQueue clone_obj = spl_heap_object_clone

Definition at line 1149 of file spl_heap.c.

◆ count_elements

spl_handler_SplPriorityQueue count_elements = spl_heap_object_count_elements

Definition at line 1150 of file spl_heap.c.

◆ create_object

spl_ce_SplPriorityQueue create_object = spl_heap_object_new

Definition at line 1142 of file spl_heap.c.

◆ default_object_handlers

spl_ce_SplPriorityQueue default_object_handlers = &spl_handler_SplHeap

Definition at line 1143 of file spl_heap.c.

◆ free_obj

spl_handler_SplPriorityQueue free_obj = spl_heap_object_free_storage

Definition at line 1152 of file spl_heap.c.

◆ get_gc

spl_handler_SplPriorityQueue get_gc = spl_heap_object_get_gc

Definition at line 1151 of file spl_heap.c.

◆ get_iterator

spl_ce_SplPriorityQueue get_iterator = spl_heap_get_iterator

Definition at line 1144 of file spl_heap.c.

◆ offset

spl_handler_SplPriorityQueue offset = XtOffsetOf(spl_heap_object, std)

Definition at line 1148 of file spl_heap.c.

◆ spl_ce_SplHeap

PHPAPI zend_class_entry* spl_ce_SplHeap

Definition at line 38 of file spl_heap.c.

◆ spl_ce_SplMaxHeap

spl_ce_SplMaxHeap = register_class_SplMaxHeap(spl_ce_SplHeap)

Definition at line 39 of file spl_heap.c.

◆ spl_ce_SplMinHeap

spl_ce_SplMinHeap = register_class_SplMinHeap(spl_ce_SplHeap)

Definition at line 40 of file spl_heap.c.

◆ spl_ce_SplPriorityQueue

spl_ce_SplPriorityQueue = register_class_SplPriorityQueue(zend_ce_iterator, zend_ce_countable)

Definition at line 41 of file spl_heap.c.

◆ SUCCESS

return SUCCESS

Definition at line 1175 of file spl_heap.c.