Skip to content

Commit d61141c

Browse files
Add SplMultiMap data structure
1 parent 5077e1b commit d61141c

15 files changed

+1279
-0
lines changed

ext/spl/config.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ PHP_NEW_EXTENSION([spl], m4_normalize([
88
spl_functions.c
99
spl_heap.c
1010
spl_iterators.c
11+
spl_multimap.c
1112
spl_observer.c
1213
]),
1314
[no],,
@@ -22,6 +23,7 @@ PHP_INSTALL_HEADERS([ext/spl], m4_normalize([
2223
spl_functions.h
2324
spl_heap.h
2425
spl_iterators.h
26+
spl_multimap.h
2527
spl_observer.h
2628
]))
2729
PHP_ADD_EXTENSION_DEP(spl, pcre, true)

ext/spl/php_spl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "spl_dllist.h"
3333
#include "spl_fixedarray.h"
3434
#include "spl_heap.h"
35+
#include "spl_multimap.h"
3536
#include "zend_exceptions.h"
3637
#include "zend_interfaces.h"
3738
#include "main/snprintf.h"
@@ -203,6 +204,7 @@ PHP_FUNCTION(class_uses)
203204
SPL_ADD_CLASS(SplHeap, z_list, sub, allow, ce_flags); \
204205
SPL_ADD_CLASS(SplMinHeap, z_list, sub, allow, ce_flags); \
205206
SPL_ADD_CLASS(SplMaxHeap, z_list, sub, allow, ce_flags); \
207+
SPL_ADD_CLASS(SplMultiMap, z_list, sub, allow, ce_flags); \
206208
SPL_ADD_CLASS(SplObjectStorage, z_list, sub, allow, ce_flags); \
207209
SPL_ADD_CLASS(SplObserver, z_list, sub, allow, ce_flags); \
208210
SPL_ADD_CLASS(SplPriorityQueue, z_list, sub, allow, ce_flags); \
@@ -734,6 +736,7 @@ PHP_MINIT_FUNCTION(spl)
734736
PHP_MINIT(spl_dllist)(INIT_FUNC_ARGS_PASSTHRU);
735737
PHP_MINIT(spl_heap)(INIT_FUNC_ARGS_PASSTHRU);
736738
PHP_MINIT(spl_fixedarray)(INIT_FUNC_ARGS_PASSTHRU);
739+
PHP_MINIT(spl_multimap)(INIT_FUNC_ARGS_PASSTHRU);
737740
PHP_MINIT(spl_observer)(INIT_FUNC_ARGS_PASSTHRU);
738741

739742
return SUCCESS;

0 commit comments

Comments
 (0)