small revisions

This commit is contained in:
polos 2018-02-16 17:03:34 +01:00
parent caae249b4f
commit 0f1ae2cc07
4 changed files with 12 additions and 9 deletions

View file

@ -111,7 +111,7 @@
(qselect qsel) &optional on-selected)
(wrap-in-qrun*
qset-null object)
qset-null object &optional (test t))
(wrap-in-qrun*
%qsingle-shot milliseconds function)

View file

@ -1875,7 +1875,7 @@ cl_object qdelete2(cl_object l_obj, cl_object l_later) {
ok = true; }
if(ok) {
STATIC_SYMBOL_PKG (s_qset_null, "QSET-NULL", "EQL")
cl_funcall(2, s_qset_null, l_obj);
cl_funcall(3, s_qset_null, l_obj, Cnil);
return Ct; }}
// no error message (unintentional multiple deletion)
return Cnil; }

View file

@ -420,12 +420,14 @@
,source*
,plural-number)))
(defun qset-null (obj)
(defun qset-null (obj &optional (test t))
"args: (object)
Sets the Qt object pointer to <code>0</code>. This function is called automatically after <code>qdel</code>."
(let ((obj* (ensure-qt-object obj)))
(when (qt-object-p obj*)
(setf (qt-object-pointer obj*) 0))))
(if test ; after e.g. QDELETE, we don't need to test (faster)
(let ((obj* (ensure-qt-object obj)))
(when (qt-object-p obj*)
(setf (qt-object-pointer obj*) 0)))
(setf (qt-object-pointer obj) 0)))
(defun qgui (&optional ev)
"args: (&optional process-events)

View file

@ -72,9 +72,10 @@
,@body))
(defmacro do-string ((var str) &body body)
`(map nil (lambda (,var)
,@body)
,str))
`(block nil
(map nil (lambda (,var)
,@body)
,str)))
(defmacro do-with (with &body body)
`(progn