1/*
2   +----------------------------------------------------------------------+
3   | Zend Engine                                                          |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1998-2014 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
307        original_stack->top = EG(vm_stack_top);
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 frames */
318
319        generator->execute_data->prev_execute_data = original_execute_data;
320
321        /* Resume execution */
322        generator->flags |= ZEND_GENERATOR_CURRENTLY_RUNNING;
323        zend_execute_ex(generator->execute_data);
324        generator->flags &= ~ZEND_GENERATOR_CURRENTLY_RUNNING;
325
326        /* Unlink generator call_frame from the caller */
327        if (generator->execute_data) {
328            generator->execute_data->prev_execute_data = NULL;
329        }
330
331        /* Restore executor globals */
332        EG(current_execute_data) = original_execute_data;
333        EG(scope) = original_scope;
334        EG(vm_stack_top) = original_stack->top;
335        EG(vm_stack_end) = original_stack->end;
336        EG(vm_stack) = original_stack;
337
338        /* If an exception was thrown in the generator we have to internally
339         * rethrow it in the parent scope. */
340        if (UNEXPECTED(EG(exception) != NULL)) {
341            zend_throw_exception_internal(NULL);
342        }
343    }
344}
345/* }}} */
346
347static void zend_generator_ensure_initialized(zend_generator *generator) /* {{{ */
348{
349    if (generator->execute_data && Z_TYPE(generator->value) == IS_UNDEF) {
350        zend_generator_resume(generator);
351        generator->flags |= ZEND_GENERATOR_AT_FIRST_YIELD;
352    }
353}
354/* }}} */
355
356static void zend_generator_rewind(zend_generator *generator) /* {{{ */
357{
358    zend_generator_ensure_initialized(generator);
359
360    if (!(generator->flags & ZEND_GENERATOR_AT_FIRST_YIELD)) {
361        zend_throw_exception(NULL, "Cannot rewind a generator that was already run", 0);
362    }
363}
364/* }}} */
365
366/* {{{ proto void Generator::rewind()
367 * Rewind the generator */
368ZEND_METHOD(Generator, rewind)
369{
370    zend_generator *generator;
371
372    if (zend_parse_parameters_none() == FAILURE) {
373        return;
374    }
375
376    generator = (zend_generator *) Z_OBJ_P(getThis());
377
378    zend_generator_rewind(generator);
379}
380/* }}} */
381
382/* {{{ proto bool Generator::valid()
383 * Check whether the generator is valid */
384ZEND_METHOD(Generator, valid)
385{
386    zend_generator *generator;
387
388    if (zend_parse_parameters_none() == FAILURE) {
389        return;
390    }
391
392    generator = (zend_generator *) Z_OBJ_P(getThis());
393
394    zend_generator_ensure_initialized(generator);
395
396    RETURN_BOOL(Z_TYPE(generator->value) != IS_UNDEF);
397}
398/* }}} */
399
400/* {{{ proto mixed Generator::current()
401 * Get the current value */
402ZEND_METHOD(Generator, current)
403{
404    zend_generator *generator;
405
406    if (zend_parse_parameters_none() == FAILURE) {
407        return;
408    }
409
410    generator = (zend_generator *) Z_OBJ_P(getThis());
411
412    zend_generator_ensure_initialized(generator);
413
414    if (Z_TYPE(generator->value) != IS_UNDEF) {
415        RETURN_ZVAL_FAST(&generator->value);
416    }
417}
418/* }}} */
419
420/* {{{ proto mixed Generator::key()
421 * Get the current key */
422ZEND_METHOD(Generator, key)
423{
424    zend_generator *generator;
425
426    if (zend_parse_parameters_none() == FAILURE) {
427        return;
428    }
429
430    generator = (zend_generator *) Z_OBJ_P(getThis());
431
432    zend_generator_ensure_initialized(generator);
433
434    if (Z_TYPE(generator->key) != IS_UNDEF) {
435        RETURN_ZVAL_FAST(&generator->key);
436    }
437}
438/* }}} */
439
440/* {{{ proto void Generator::next()
441 * Advances the generator */
442ZEND_METHOD(Generator, next)
443{
444    zend_generator *generator;
445
446    if (zend_parse_parameters_none() == FAILURE) {
447        return;
448    }
449
450    generator = (zend_generator *) Z_OBJ_P(getThis());
451
452    zend_generator_ensure_initialized(generator);
453
454    zend_generator_resume(generator);
455}
456/* }}} */
457
458/* {{{ proto mixed Generator::send(mixed $value)
459 * Sends a value to the generator */
460ZEND_METHOD(Generator, send)
461{
462    zval *value;
463    zend_generator *generator;
464
465    if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
466        return;
467    }
468
469    generator = (zend_generator *) Z_OBJ_P(getThis());
470
471    zend_generator_ensure_initialized(generator);
472
473    /* The generator is already closed, thus can't send anything */
474    if (!generator->execute_data) {
475        return;
476    }
477
478    /* Put sent value in the target VAR slot, if it is used */
479    if (generator->send_target) {
480        if (Z_REFCOUNTED_P(generator->send_target)) Z_DELREF_P(generator->send_target);
481        ZVAL_COPY(generator->send_target, value);
482    }
483
484    zend_generator_resume(generator);
485
486    if (Z_TYPE(generator->value) != IS_UNDEF) {
487        RETURN_ZVAL_FAST(&generator->value);
488    }
489}
490/* }}} */
491
492/* {{{ proto mixed Generator::throw(Exception $exception)
493 * Throws an exception into the generator */
494ZEND_METHOD(Generator, throw)
495{
496    zval *exception, exception_copy;
497    zend_generator *generator;
498
499    if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &exception) == FAILURE) {
500        return;
501    }
502
503    ZVAL_DUP(&exception_copy, exception);
504
505    generator = (zend_generator *) Z_OBJ_P(getThis());
506
507    zend_generator_ensure_initialized(generator);
508
509    if (generator->execute_data) {
510        /* Throw the exception in the context of the generator */
511        zend_execute_data *current_execute_data = EG(current_execute_data);
512        EG(current_execute_data) = generator->execute_data;
513
514        zend_throw_exception_object(&exception_copy);
515
516        EG(current_execute_data) = current_execute_data;
517
518        zend_generator_resume(generator);
519
520        if (Z_TYPE(generator->value) != IS_UNDEF) {
521            RETURN_ZVAL_FAST(&generator->value);
522        }
523    } else {
524        /* If the generator is already closed throw the exception in the
525         * current context */
526        zend_throw_exception_object(&exception_copy);
527    }
528}
529/* }}} */
530
531/* {{{ proto void Generator::__wakeup()
532 * Throws an Exception as generators can't be serialized */
533ZEND_METHOD(Generator, __wakeup)
534{
535    /* Just specifying the zend_class_unserialize_deny handler is not enough,
536     * because it is only invoked for C unserialization. For O the error has
537     * to be thrown in __wakeup. */
538
539    if (zend_parse_parameters_none() == FAILURE) {
540        return;
541    }
542
543    zend_throw_exception(NULL, "Unserialization of 'Generator' is not allowed", 0);
544}
545/* }}} */
546
547/* get_iterator implementation */
548
549static void zend_generator_iterator_dtor(zend_object_iterator *iterator) /* {{{ */
550{
551    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
552    generator->iterator = NULL;
553    zval_ptr_dtor(&iterator->data);
554    zend_iterator_dtor(iterator);
555}
556/* }}} */
557
558static int zend_generator_iterator_valid(zend_object_iterator *iterator) /* {{{ */
559{
560    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
561
562    zend_generator_ensure_initialized(generator);
563
564    return Z_TYPE(generator->value) != IS_UNDEF ? SUCCESS : FAILURE;
565}
566/* }}} */
567
568static zval *zend_generator_iterator_get_data(zend_object_iterator *iterator) /* {{{ */
569{
570    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
571
572    zend_generator_ensure_initialized(generator);
573
574    return &generator->value;
575}
576/* }}} */
577
578static void zend_generator_iterator_get_key(zend_object_iterator *iterator, zval *key) /* {{{ */
579{
580    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
581
582    zend_generator_ensure_initialized(generator);
583
584    if (Z_TYPE(generator->key) != IS_UNDEF) {
585        ZVAL_ZVAL(key, &generator->key, 1, 0);
586    } else {
587        ZVAL_NULL(key);
588    }
589}
590/* }}} */
591
592static void zend_generator_iterator_move_forward(zend_object_iterator *iterator) /* {{{ */
593{
594    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
595
596    zend_generator_ensure_initialized(generator);
597
598    zend_generator_resume(generator);
599}
600/* }}} */
601
602static void zend_generator_iterator_rewind(zend_object_iterator *iterator) /* {{{ */
603{
604    zend_generator *generator = (zend_generator*)Z_OBJ(iterator->data);
605
606    zend_generator_rewind(generator);
607}
608/* }}} */
609
610static zend_object_iterator_funcs zend_generator_iterator_functions = {
611    zend_generator_iterator_dtor,
612    zend_generator_iterator_valid,
613    zend_generator_iterator_get_data,
614    zend_generator_iterator_get_key,
615    zend_generator_iterator_move_forward,
616    zend_generator_iterator_rewind
617};
618
619zend_object_iterator *zend_generator_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */
620{
621    zend_object_iterator *iterator;
622    zend_generator *generator = (zend_generator*)Z_OBJ_P(object);
623
624    if (!generator->execute_data) {
625        zend_throw_exception(NULL, "Cannot traverse an already closed generator", 0);
626        return NULL;
627    }
628
629    if (by_ref && !(generator->execute_data->func->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
630        zend_throw_exception(NULL, "You can only iterate a generator by-reference if it declared that it yields by-reference", 0);
631        return NULL;
632    }
633
634    iterator = generator->iterator = emalloc(sizeof(zend_object_iterator));
635
636    zend_iterator_init(iterator);
637
638    iterator->funcs = &zend_generator_iterator_functions;
639    ZVAL_COPY(&iterator->data, object);
640
641    return iterator;
642}
643/* }}} */
644
645ZEND_BEGIN_ARG_INFO(arginfo_generator_void, 0)
646ZEND_END_ARG_INFO()
647
648ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_send, 0, 0, 1)
649    ZEND_ARG_INFO(0, value)
650ZEND_END_ARG_INFO()
651
652ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_throw, 0, 0, 1)
653    ZEND_ARG_INFO(0, exception)
654ZEND_END_ARG_INFO()
655
656static const zend_function_entry generator_functions[] = {
657    ZEND_ME(Generator, rewind,   arginfo_generator_void, ZEND_ACC_PUBLIC)
658    ZEND_ME(Generator, valid,    arginfo_generator_void, ZEND_ACC_PUBLIC)
659    ZEND_ME(Generator, current,  arginfo_generator_void, ZEND_ACC_PUBLIC)
660    ZEND_ME(Generator, key,      arginfo_generator_void, ZEND_ACC_PUBLIC)
661    ZEND_ME(Generator, next,     arginfo_generator_void, ZEND_ACC_PUBLIC)
662    ZEND_ME(Generator, send,     arginfo_generator_send, ZEND_ACC_PUBLIC)
663    ZEND_ME(Generator, throw,    arginfo_generator_throw, ZEND_ACC_PUBLIC)
664    ZEND_ME(Generator, __wakeup, arginfo_generator_void, ZEND_ACC_PUBLIC)
665    ZEND_FE_END
666};
667
668void zend_register_generator_ce(void) /* {{{ */
669{
670    zend_class_entry ce;
671
672    INIT_CLASS_ENTRY(ce, "Generator", generator_functions);
673    zend_ce_generator = zend_register_internal_class(&ce);
674    zend_ce_generator->ce_flags |= ZEND_ACC_FINAL;
675    zend_ce_generator->create_object = zend_generator_create;
676    zend_ce_generator->serialize = zend_class_serialize_deny;
677    zend_ce_generator->unserialize = zend_class_unserialize_deny;
678
679    /* get_iterator has to be assigned *after* implementing the inferface */
680    zend_class_implements(zend_ce_generator, 1, zend_ce_iterator);
681    zend_ce_generator->get_iterator = zend_generator_get_iterator;
682    zend_ce_generator->iterator_funcs.funcs = &zend_generator_iterator_functions;
683
684    memcpy(&zend_generator_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
685    zend_generator_handlers.free_obj = zend_generator_free_storage;
686    zend_generator_handlers.dtor_obj = zend_generator_dtor_storage;
687    zend_generator_handlers.clone_obj = NULL;
688    zend_generator_handlers.get_constructor = zend_generator_get_constructor;
689}
690/* }}} */
691
692/*
693 * Local variables:
694 * tab-width: 4
695 * c-basic-offset: 4
696 * indent-tabs-mode: t
697 * End:
698 */
699