projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix leaks
[m6w6/ext-psi]
/
src
/
plist.c
diff --git
a/src/plist.c
b/src/plist.c
index 048305ac8514e7cc2995cdf52a4b28f84cb12d26..8b38fe018dd66b5781286643d7f057cb64bd3bf1 100644
(file)
--- a/
src/plist.c
+++ b/
src/plist.c
@@
-23,7
+23,11
@@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
-#include "php_psi_stdinc.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#else
+# include "php_config.h"
+#endif
#include "plist.h"
#include "plist.h"
@@
-148,6
+152,14
@@
bool psi_plist_unset(struct psi_plist *list, size_t index) {
return false;
}
return false;
}
+bool psi_plist_set(struct psi_plist *list, size_t index, void *ptr) {
+ if (list && list->count > index) {
+ PLIST_CPY(list, PLIST_ELE(list, index), ptr);
+ return true;
+ }
+ return false;
+}
+
bool psi_plist_del(struct psi_plist *list, size_t index, void *ptr) {
if (list && list->count > index) {
if (ptr) {
bool psi_plist_del(struct psi_plist *list, size_t index, void *ptr) {
if (list && list->count > index) {
if (ptr) {