+#ifdef AO_SCHEME_FEATURE_UNDEF
+ao_poly
+ao_scheme_frame_del(struct ao_scheme_frame *frame, ao_poly atom)
+{
+ struct ao_scheme_frame_vals *vals = ao_scheme_poly_frame_vals(frame->vals);
+ int l = ao_scheme_frame_find(frame, frame->num, atom);
+ int f = frame->num;
+ struct ao_scheme_frame *moved_frame;
+
+ if (l >= frame->num)
+ return _ao_scheme_bool_false;
+
+ if (vals->vals[l].atom != atom)
+ return _ao_scheme_bool_false;
+
+ /* squash the deleted entry */
+ memmove(&vals->vals[l],
+ &vals->vals[l+1],
+ (f - l) * sizeof (struct ao_scheme_val));
+
+ /* allocate a smaller vals array */
+ ao_scheme_frame_stash(frame);
+ moved_frame = ao_scheme_frame_realloc(frame, f - 1);
+ frame = ao_scheme_frame_fetch();
+
+ /*
+ * We couldn't allocate a smaller frame, so just
+ * ignore the last value in the array
+ */
+ if (!moved_frame)
+ frame->num = f - 1;
+ return _ao_scheme_bool_true;
+}
+#endif
+