OSSP CVS Repository

ossp - Difference in ossp-pkg/ex/00TODO versions 1.1 and 1.2
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/ex/00TODO 1.1 -> 1.2

--- 00TODO       2002/02/14 15:56:04     1.1
+++ 00TODO       2002/03/07 15:01:30     1.2
@@ -1,4 +1,29 @@
 
+Idea: deferred exceptions:
+o ex_defer BLOCK
+o if (ex_deferred) ...
+
+to avoid having to initialize every variable in this context:
+
+char *cp1;
+char *cp2;
+char *cp3;
+ex_try {
+    ex_defer {
+        cp1 = mymalloc(...);
+        cp2 = mymalloc(...);
+        cp3 = mymalloc(...);
+    }
+}
+ex_cleanup {
+    if (cp1 != NULL)
+        free(cp1);
+    if (cp2 != NULL)
+        free(cp2);
+    if (cp3 != NULL)
+        free(cp3);
+}
+
 **** IMPROVE DOCUMENTATION ****
 
 /* BAD EXAMPLE */

CVSTrac 2.0.1