2
0
Эх сурвалжийг харах

Merge branch 'master' of https://github.com/albertodemichelis/squirrel

Alberto Demichelis 2 жил өмнө
parent
commit
1c1fd9a370

+ 1 - 1
doc/source/reference/language/classes.rst

@@ -170,7 +170,7 @@ instead of curly brackets ``{}`` for the attribute declaration to increase reada
 
 This means that all rules that apply to tables apply to attributes.
 
-Attributes can be retrieved through the built-in function ``classobj.getattributes(membername)`` (see <link linkend="builtin">built-in functions</link>).
+Attributes can be retrieved through the built-in function ``classobj.getattributes(membername)`` (see :ref:`built-in functions <builtin_functions>`).
 and can be modified/added through the built-in function ``classobj.setattributes(membername,val)``.
 
 the following code iterates through the attributes of all Foo members.::

+ 8 - 1
squirrel/sqvm.cpp

@@ -715,7 +715,13 @@ bool SQVM::Execute(SQObjectPtr &closure, SQInteger nargs, SQInteger stackbase,SQ
             ci->_root = SQTrue;
                       }
             break;
-        case ET_RESUME_GENERATOR: _generator(closure)->Resume(this, outres); ci->_root = SQTrue; traps += ci->_etraps; break;
+        case ET_RESUME_GENERATOR: 
+            if(!_generator(closure)->Resume(this, outres)) {
+                return false;
+            }
+            ci->_root = SQTrue;
+            traps += ci->_etraps;
+            break;
         case ET_RESUME_VM:
         case ET_RESUME_THROW_VM:
             traps = _suspended_traps;
@@ -1123,6 +1129,7 @@ exception_trap:
         return false;
     }
     assert(0);
+    return false;
 }
 
 bool SQVM::CreateClassInstance(SQClass *theclass, SQObjectPtr &inst, SQObjectPtr &constructor)