1/*
2   +----------------------------------------------------------------------+
3   | Zend Engine                                                          |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
6   +----------------------------------------------------------------------+
7   | This source file is subject to version 2.00 of the Zend license,     |
8   | that is bundled with this package in the file LICENSE, and is        |
9   | available through the world-wide-web at the following url:           |
10   | http://www.zend.com/license/2_00.txt.                                |
11   | If you did not receive a copy of the Zend license and are unable to  |
12   | obtain it through the world-wide-web, please send a note to          |
13   | license@zend.com so we can mail you a copy immediately.              |
14   +----------------------------------------------------------------------+
15   | Authors: Nikita Popov <nikic@php.net>                                |
16   +----------------------------------------------------------------------+
17*/
18
19/* $Id$ */
20
21#include "zend.h"
22#include "zend_API.h"
23#include "zend_interfaces.h"
24#include "zend_exceptions.h"
25#include "zend_generators.h"
26
27ZEND_API zend_class_entry *zend_ce_generator;
28static zend_object_handlers zend_generator_handlers;
29
30static zend_object *zend_generator_create(zend_class_entry *class_type);
31
32static void zend_generator_cleanup_unfinished_execution(zend_generator *generator) /* {{{ */
33{
34    zend_execute_data *execute_data = generator->execute_data;
35    zend_op_array *op_array = &execute_data->func->op_array;
36
37    if (generator->send_target) {
38        if (Z_REFCOUNTED_P(generator->send_target)) Z_DELREF_P(generator->send_target);
39        generator->send_target = NULL;
40    }
41
42    /* Manually free loop variables, as execution couldn't reach their
43     * SWITCH_FREE / FREE opcodes. */
44    {
45        /* -1 required because we want the last run opcode, not the
46         * next to-be-run one. */
47        uint32_t op_num = execute_data->opline - op_array->opcodes - 1;
48
49        int i;
50        for (i = 0; i < op_array->last_brk_cont; ++i) {
51            zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
52
53            if (brk_cont->start < 0) {
54                continue;
55            } else if ((uint32_t)brk_cont->start > op_num) {
56                break;
57            } else if (brk_cont->brk >= 0 && (uint32_t)brk_cont->brk > op_num) {
58                zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
59
60                if (brk_opline->opcode == ZEND_FREE) {
61                    zval *var = EX_VAR(brk_opline->op1.var);
62                    zval_ptr_dtor_nogc(var);
63                }
64            }
65        }
66    }
67
68    /* If yield was used as a function argument there may be active
69     * method calls those objects need to be freed */
70    while (execute_data->call) {
71        if (Z_OBJ(execute_data->call->This)) {
72            OBJ_RELEASE(Z_OBJ(execute_data->call->This));
73        }
74        execute_data->call = execute_data->call->prev_execute_data;
75    }
76}
77/* }}} */
78
79ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution) /* {{{ */
80{
81    if (Z_TYPE(generator->value) != IS_UNDEF) {
82        zval_ptr_dtor(&generator->value);
83        ZVAL_UNDEF(&generator->value);
84    }
85
86    if (Z_TYPE(generator->key) != IS_UNDEF) {
87        zval_ptr_dtor(&generator->key);
88        ZVAL_UNDEF(&generator->key);
89    }
90
91    if (generator->execute_data) {
92        zend_execute_data *execute_data = generator->execute_data;
93        zend_op_array *op_array = &execute_data->func->op_array;
94
95        if (!execute_data->symbol_table) {
96            zend_free_compiled_variables(execute_data);
97        } else {
98            zend_clean_and_cache_symbol_table(execute_data->symbol_table);
99        }
100
101        if (Z_OBJ(execute_data->This)) {
102            OBJ_RELEASE(Z_OBJ(execute_data->This));
103        }
104
105        /* A fatal error / die occurred during the generator execution. Trying to clean
106         * up the stack may not be safe in this case. */
107        if (CG(unclean_shutdown)) {
108            generator->execute_data = NULL;
109            return;
110        }
111
112        zend_vm_stack_free_extra_args(generator->execute_data);
113
114        /* Some cleanups are only necessary if the generator was closued
115         * before it could finish execution (reach a return statement). */
116        if (!finished_execution) {
117            zend_generator_cleanup_unfinished_execution(generator);
118        }
119
120        /* Free a clone of closure */
121        if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
122            destroy_op_array(op_array);
123            efree_size(op_array, sizeof(zend_op_array));
124        }
125
126        efree(generator->stack);
127        generator->execute_data = NULL;
128    }
129}
130/* }}} */
131
132static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
133{
134    zend_generator *generator = (zend_generator*) object;
135    zend_execute_data *ex = generator->execute_data;
136    uint32_t op_num, finally_op_num, finally_op_end;
137    int i;
138
139    if (!ex || !(ex->func->op_array.fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
140        return;
141    }
142
143    /* -1 required because we want the last run opcode, not the
144     * next to-be-run one. */
145    op_num = ex->opline - ex->func->op_array.opcodes - 1;
146
147    /* Find next finally block */
148    finally_op_num = 0;
149    finally_op_end = 0;
150    for (i = 0; i < ex->func->op_array.last_try_catch; i++) {
151        zend_try_catch_element *try_catch = &ex->func->op_array.try_catch_array[i];
152
153        if (op_num < try_catch->try_op) {
154            break;
155        }
156
157        if (op_num < try_catch->finally_op) {
158            finally_op_num = try_catch->finally_op;
159            finally_op_end = try_catch->finally_end;
160        }
161    }
162
163    /* If a finally block was found we jump directly to it and
164     * resume the generator. */
165    if (finally_op_num) {
166        zval *fast_call = ZEND_CALL_VAR(ex, ex->func->op_array.opcodes[finally_op_end].op1.var);
167
168        Z_OBJ_P(fast_call) = NULL;
169        fast_call->u2.lineno = (uint32_t)-1;
170        ex->opline = &ex->func->op_array.opcodes[finally_op_num];
171        generator->flags |= ZEND_GENERATOR_FORCED_CLOSE;
172        zend_generator_resume(generator);
173    }
174}
175/* }}} */
176
177static void zend_generator_free_storage(zend_object *object) /* {{{ */
178{
179    zend_generator *generator = (zend_generator*) object;
180
181    zend_generator_close(generator, 0);
182
183    zend_object_std_dtor(&generator->std);
184
185    if (generator->iterator) {
186        zend_iterator_dtor(generator->iterator);
187    }
188}
189/* }}} */
190
191static zend_object *zend_generator_create(zend_class_entry *class_type) /* {{{ */
192{
193    zend_generator *generator;
194
195    generator = emalloc(sizeof(zend_generator));
196    memset(generator, 0, sizeof(zend_generator));
197
198    /* The key will be incremented on first use, so it'll start at 0 */
199    generator->largest_used_integer_key = -1;
200
201    zend_object_std_init(&generator->std, class_type);
202    generator->std.handlers = &zend_generator_handlers;
203
204    return (zend_object*)generator;
205}
206/* }}} */
207
208static int copy_closure_static_var(zval *var, int num_args, va_list args, zend_hash_key *key) /* {{{ */
209{
210    HashTable *target = va_arg(args, HashTable *);
211
212    ZVAL_MAKE_REF(var);
213    Z_ADDREF_P(var);
214    zend_hash_update(target, key->key, var);
215    return 0;
216}
217/* }}} */
218
219/* Requires globals EG(scope), EG(This) and EG(current_execute_data). */
220ZEND_API void zend_generator_create_zval(zend_execute_data *call, zend_op_array *op_array, zval *return_value) /* {{{ */
221{
222    zend_generator *generator;
223    zend_execute_data *current_execute_data;
224    zend_execute_data *execute_data;
225    zend_vm_stack current_stack = EG(vm_stack);
226
227    current_stack->top = EG(vm_stack_top);
228    /* Create a clone of closure, because it may be destroyed */
229    if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
230        zend_op_array *op_array_copy = (zend_op_array*)emalloc(sizeof(zend_op_array));
231        *op_array_copy = *op_array;
232
233        (*op_array->refcount)++;
234        op_array->run_time_cache = NULL;
235        if (op_array->static_variables) {
236            ALLOC_HASHTABLE(op_array_copy->static_variables);
237            zend_hash_init(
238                op_array_copy->static_variables,
239                zend_hash_num_elements(op_array->static_variables),
240                NULL, ZVAL_PTR_DTOR, 0
241            );
242            zend_hash_apply_with_arguments(
243                op_array->static_variables,
244                copy_closure_static_var, 1,
245                op_array_copy->static_variables
246            );
247        }
248
249        op_array = op_array_copy;
250    }
251
252    /* Create new execution context. We have to back up and restore
253     * EG(current_execute_data) here. */
254    current_execute_data = EG(current_execute_data);
255    execute_data = zend_create_generator_execute_data(call, op_array, return_value);
256    EG(current_execute_data) = current_execute_data;
257
258    object_init_ex(return_value, zend_ce_generator);
259
260    if (Z_OBJ(call->This)) {
261        Z_ADDREF(call->This);
262    }
263
264    /* Save execution context in generator object. */
265    generator = (zend_generator *) Z_OBJ_P(return_value);
266    execute_data->prev_execute_data = NULL;
267    generator->execute_data = execute_data;
268    generator->stack = EG(vm_stack);
269    generator->stack->top = EG(vm_stack_top);
270    EG(vm_stack_top) = current_stack->top;
271    EG(vm_stack_end) = current_stack->end;
272    EG(vm_stack) = current_stack;
273
274    /* EX(return_value) keeps pointer to zend_object (not a real zval) */
275    execute_data->return_value = (zval*)generator;
276}
277/* }}} */
278
279static zend_function *zend_generator_get_constructor(zend_object *object) /* {{{ */
280{
281    zend_error(E_RECOVERABLE_ERROR, "The \"Generator\" class is reserved for internal use and cannot be manually instantiated");
282
283    return NULL;
284}
285/* }}} */
286
287ZEND_API void zend_generator_resume(zend_generator *generator) /* {{{ */
288{
289    /* The generator is already closed, thus can't resume */
290    if (!generator->execute_data) {
291        return;
292    }
293
294    if (generator->flags & ZEND_GENERATOR_CURRENTLY_RUNNING) {
295        zend_error(E_ERROR, "Cannot resume an already running generator");
296    }
297
298    /* Drop the AT_FIRST_YIELD flag */
299    generator->flags &= ~ZEND_GENERATOR_AT_FIRST_YIELD;
300
301    {
302        /* Backup executor globals */
303        zend_execute_data *original_execute_data = EG(current_execute_data);
304        zend_class_entry *original_scope = EG(scope);
305        zend_vm_stack original_stack = EG(vm_stack);
306        original_stack->top = EG(vm_stack_top);
307
308        /* Set executor globals */
309        EG(current_execute_data) = generator->execute_data;
310        EG(scope) = generator->execute_data->func->common.scope;
311        EG(vm_stack_top) = generator->stack->top;
312        EG(vm_stack_end) = generator->stack->end;
313        EG(vm_stack) = generator->stack;
314
315        /* We want the backtrace to look as if the generator function was
316         * called from whatever method we are current running (e.g. next()).
317         * So we have to link generator call frame with caller call frame. */
318        generator->execute_data->prev_execute_data = original_execute_data;
319
320        /* Resume execution */
321        generator->flags |= ZEND_GENERATOR_CURRENTLY_RUNNING;
322        zend_execute_ex(generator->execute_data);
323        generator->flags &= ~ZEND_GENERATOR_CURRENTLY_RUNNING;
324
325        /* Unlink generator call_frame from the caller and backup vm_stack_top */
326        if (generator->execute_data) {
327            generator->stack = EG(vm_stack);
328            generator->stack->top = EG(vm_stack_top);
329            generator->execute_data->prev_execute_data = NULL;
330        }
331
332        /* Restore executor globals */
333        EG(current_execute_data) = original_execute_data;
334        EG(scope) = original_scope;
335        EG(vm_stack_top) = original_stack->top;
336        EG(vm_stack_end) = original_stack->end;
337        EG(vm_stack) = original_stack;
338
339        /* If an exception was thrown in the generator we have to internally
340         * rethrow it in the parent scope. */
341        if (UNEXPECTED(EG(exception) != NULL)) {
342            zend_throw_exception_internal(NULL);
343        }
344    }
345}
346/* }}} */
347
348static void zend_generator_ensure_initialized(zend_generator *generator) /* {{{ */
349{
350    if (generator->execute_data && Z_TYPE(generator->value) == IS_UNDEF) {
351        zend_generator_resume(generator);
352        generator->flags |= ZEND_GENERATOR_AT_FIRST_YIELD;
353    }
354}
355/* }}} */
356
357static void zend_generator_rewind(zend_generator *generator) /* {{{ */
358{
359    zend_generator_ensure_initialized(generator);
360
361    if (!(generator->flags & ZEND_GENERATOR_AT_FIRST_YIELD)) {
362        zend_throw_exception(NULL, "Cannot rewind a generator that was already run", 0);
363    }
364}
365/* }}} */
366
367/* {{{ proto void Generator::rewind()
368 * Rewind the generator */
369ZEND_METHOD(Generator, rewind)
370{
371    zend_generator *generator;
372
373    if (zend_parse_parameters_none() == FAILURE) {
374        return;
375    }
376
377    generator = (zend_generator *) Z_OBJ_P(getThis());
378
379    zend_generator_rewind(generator);
380}
381/* }}} */
382
383/* {{{ proto bool Generator::valid()
384 * Check whether the generator is valid */
385ZEND_METHOD(Generator, valid)
386{
387    zend_generator *generator;
388
389    if (zend_parse_parameters_none() == FAILURE) {
390        return;
391    }
392
393    generator = (zend_generator *) Z_OBJ_P(getThis());
394
395    zend_generator_ensure_initialized(generator);
396
397    RETURN_BOOL(Z_TYPE(generator->value) != IS_UNDEF);
398}
399/* }}} */
400
401/* {{{ proto mixed Generator::current()
402 * Get the current value */
403ZEND_METHOD(Generator, current)
404{
405    zend_generator *generator;
406
407    if (zend_parse_parameters_none() == FAILURE) {
408        return;
409    }
410
411    generator = (zend_generator *) Z_OBJ_P(getThis());
412
413    zend_generator_ensure_initialized(generator);
414
415    if (Z_TYPE(generator->value) != IS_UNDEF) {
416        RETURN_ZVAL_FAST(&generator->value);
417    }
418}
419/* }}} */
420
421/* {{{ proto mixed Generator::key()
422 * Get the current key */
423ZEND_METHOD(Generator, key)
424{
425    zend_generator *generator;
426
427    if (zend_parse_parameters_none() == FAILURE) {
428        return;
429    }
430
431    generator = (zend_generator *) Z_OBJ_P(getThis());
432
433    zend_generator_ensure_initialized(generator);
434
435    if (Z_TYPE(generator->key) != IS_UNDEF) {
436        RETURN_ZVAL_FAST(&generator->key);
437    }
438}
439/* }}} */
440
441/* {{{ proto void Generator::next()
442 * Advances the generator */
443ZEND_METHOD(Generator, next)
444{
445    zend_generator *generator;
446
447    if (zend_parse_parameters_none() == FAILURE) {
448        return;
449    }
450
451    generator = (zend_generator *) Z_OBJ_P(getThis());
452
453    zend_generator_ensure_initialized(generator);
454
455    zend_generator_resume(generator);
456}
457/* }}} */
458
459/* {{{ proto mixed Generator::send(mixed $value)
460 * Sends a value to the generator */
461ZEND_METHOD(Generator, send)
462{
463    zval *value;
464    zend_generator *generator;
465
466    if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
467        return;
468    }
469
470    generator = (zend_generator *) Z_OBJ_P(getThis());
471
472    zend_generator_ensure_initialized(generator);
473
474    /* The generator is already closed, thus can't send anything */
475    if (!generator->execute_data) {
476        return;
477    }
478
479    /* Put sent value in the target VAR slot, if it is used */
480    if (generator->send_target) {
481        if (Z_REFCOUNTED_P(generator->send_target)) Z_DELREF_P(generator->send_target);
482        ZVAL_COPY(generator->send_target, value);
483    }
484
485    zend_generator_resume(generator);
486
487    if (Z_TYPE(generator->value) != IS_UNDEF) {
488        RETURN_ZVAL_FAST(&generator->value);
489    }
490}
491/* }}} */
492
493/* {{{ proto mixed Generator::throw(Exception $exception)
494 * Throws an exception into the generator */
495ZEND_METHOD(Generator, throw)
496{
497    zval *exception, exception_copy;
498    zend_generator *generator;
499
500    if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &exception) == FAILURE) {
501        return;
502    }
503
504    ZVAL_DUP(&exception_copy, exception);
505
506    generator = (zend_generator *) Z_OBJ_P(getThis());
507
508    zend_generator_ensure_initialized(generator);
509
510    if (generator->execute_data) {
511        /* Throw the exception in the context of the generator */
512        zend_execute_data *current_execute_data = EG(current_execute_data);
513        EG(current_execute_data) = generator->execute_data;
514
515        zend_throw_exception_object(&exception_copy);
516
517        EG(current_execute_data) = current_execute_data;
518
519        zend_generator_resume(generator);
520
521        if (Z_TYPE(generator->value) != IS_UNDEF) {
522            RETURN_ZVAL_FAST(&generator->value);
523        }
524    } else {
525        /* If the generator is already closed throw the exception in the
526         * current context */
527        zend_throw_exception_object(&exception_copy);
528    }
529}
530/* }}} */
531
532/* {{{ proto void Generator::__wakeup()
533 * Throws an Exception as generators can't be serialized */
534ZEND_METHOD(Generator, __wakeup)
535{
536    /* Just specifying the zend_class_unserialize_deny handler is not enough,
537     * because it is only invoked for C unserialization. For O the error has
538     * to be thrown in __wakeup. */
539
540    if (zend_parse_parameters_none() == FAILURE) {
541        return;
542    }
543
544    zend_throw_exception(NULL, "Unserialization of 'Generator' is not allowed", 0);
545}
546/* }}} */
547
548/* get_iterator implementation */
549
550static void zend_generator_iterator_dtor(zend_object_iterator *iterator) /* {{{ */
551{
552    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
553    generator->iterator = NULL;
554    zval_ptr_dtor(&iterator->data);
555    zend_iterator_dtor(iterator);
556}
557/* }}} */
558
559static int zend_generator_iterator_valid(zend_object_iterator *iterator) /* {{{ */
560{
561    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
562
563    zend_generator_ensure_initialized(generator);
564
565    return Z_TYPE(generator->value) != IS_UNDEF ? SUCCESS : FAILURE;
566}
567/* }}} */
568
569static zval *zend_generator_iterator_get_data(zend_object_iterator *iterator) /* {{{ */
570{
571    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
572
573    zend_generator_ensure_initialized(generator);
574
575    return &generator->value;
576}
577/* }}} */
578
579static void zend_generator_iterator_get_key(zend_object_iterator *iterator, zval *key) /* {{{ */
580{
581    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
582
583    zend_generator_ensure_initialized(generator);
584
585    if (Z_TYPE(generator->key) != IS_UNDEF) {
586        ZVAL_ZVAL(key, &generator->key, 1, 0);
587    } else {
588        ZVAL_NULL(key);
589    }
590}
591/* }}} */
592
593static void zend_generator_iterator_move_forward(zend_object_iterator *iterator) /* {{{ */
594{
595    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
596
597    zend_generator_ensure_initialized(generator);
598
599    zend_generator_resume(generator);
600}
601/* }}} */
602
603static void zend_generator_iterator_rewind(zend_object_iterator *iterator) /* {{{ */
604{
605    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
606
607    zend_generator_rewind(generator);
608}
609/* }}} */
610
611static zend_object_iterator_funcs zend_generator_iterator_functions = {
612    zend_generator_iterator_dtor,
613    zend_generator_iterator_valid,
614    zend_generator_iterator_get_data,
615    zend_generator_iterator_get_key,
616    zend_generator_iterator_move_forward,
617    zend_generator_iterator_rewind
618};
619
620zend_object_iterator *zend_generator_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */
621{
622    zend_object_iterator *iterator;
623    zend_generator *generator = (zend_generator*)Z_OBJ_P(object);
624
625    if (!generator->execute_data) {
626        zend_throw_exception(NULL, "Cannot traverse an already closed generator", 0);
627        return NULL;
628    }
629
630    if (by_ref && !(generator->execute_data->func->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
631        zend_throw_exception(NULL, "You can only iterate a generator by-reference if it declared that it yields by-reference", 0);
632        return NULL;
633    }
634
635    iterator = generator->iterator = emalloc(sizeof(zend_object_iterator));
636
637    zend_iterator_init(iterator);
638
639    iterator->funcs = &zend_generator_iterator_functions;
640    ZVAL_COPY(&iterator->data, object);
641
642    return iterator;
643}
644/* }}} */
645
646ZEND_BEGIN_ARG_INFO(arginfo_generator_void, 0)
647ZEND_END_ARG_INFO()
648
649ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_send, 0, 0, 1)
650    ZEND_ARG_INFO(0, value)
651ZEND_END_ARG_INFO()
652
653ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_throw, 0, 0, 1)
654    ZEND_ARG_INFO(0, exception)
655ZEND_END_ARG_INFO()
656
657static const zend_function_entry generator_functions[] = {
658    ZEND_ME(Generator, rewind,   arginfo_generator_void, ZEND_ACC_PUBLIC)
659    ZEND_ME(Generator, valid,    arginfo_generator_void, ZEND_ACC_PUBLIC)
660    ZEND_ME(Generator, current,  arginfo_generator_void, ZEND_ACC_PUBLIC)
661    ZEND_ME(Generator, key,      arginfo_generator_void, ZEND_ACC_PUBLIC)
662    ZEND_ME(Generator, next,     arginfo_generator_void, ZEND_ACC_PUBLIC)
663    ZEND_ME(Generator, send,     arginfo_generator_send, ZEND_ACC_PUBLIC)
664    ZEND_ME(Generator, throw,    arginfo_generator_throw, ZEND_ACC_PUBLIC)
665    ZEND_ME(Generator, __wakeup, arginfo_generator_void, ZEND_ACC_PUBLIC)
666    ZEND_FE_END
667};
668
669void zend_register_generator_ce(void) /* {{{ */
670{
671    zend_class_entry ce;
672
673    INIT_CLASS_ENTRY(ce, "Generator", generator_functions);
674    zend_ce_generator = zend_register_internal_class(&ce);
675    zend_ce_generator->ce_flags |= ZEND_ACC_FINAL;
676    zend_ce_generator->create_object = zend_generator_create;
677    zend_ce_generator->serialize = zend_class_serialize_deny;
678    zend_ce_generator->unserialize = zend_class_unserialize_deny;
679
680    /* get_iterator has to be assigned *after* implementing the inferface */
681    zend_class_implements(zend_ce_generator, 1, zend_ce_iterator);
682    zend_ce_generator->get_iterator = zend_generator_get_iterator;
683    zend_ce_generator->iterator_funcs.funcs = &zend_generator_iterator_functions;
684
685    memcpy(&zend_generator_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
686    zend_generator_handlers.free_obj = zend_generator_free_storage;
687    zend_generator_handlers.dtor_obj = zend_generator_dtor_storage;
688    zend_generator_handlers.clone_obj = NULL;
689    zend_generator_handlers.get_constructor = zend_generator_get_constructor;
690}
691/* }}} */
692
693/*
694 * Local variables:
695 * tab-width: 4
696 * c-basic-offset: 4
697 * indent-tabs-mode: t
698 * End:
699 */
700