travis: update
[m6w6/ext-psi] / src / plist.c
index 048305ac8514e7cc2995cdf52a4b28f84cb12d26..8b38fe018dd66b5781286643d7f057cb64bd3bf1 100644 (file)
  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"
 
@@ -148,6 +152,14 @@ bool psi_plist_unset(struct psi_plist *list, size_t index) {
        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) {