Browse Source

Merge pull request #57 from zeromus/master

docs fixups
Alberto Demichelis 9 years ago
parent
commit
2d509d385b

+ 3 - 3
doc/source/reference/api/object_manipulation.rst

@@ -91,7 +91,7 @@ resizes the array at the position idx in the stack.
     :returns: a SQRESULT
     :returns: a SQRESULT
     :remarks: Only works on arrays.
     :remarks: Only works on arrays.
 
 
-reverse an array in place.
+reverses an array in place.
 
 
 
 
 
 
@@ -106,7 +106,7 @@ reverse an array in place.
     :returns: a SQRESULT
     :returns: a SQRESULT
     :remarks: Only works on tables and arrays.
     :remarks: Only works on tables and arrays.
 
 
-clears all the element of the table/array at position idx in the stack.
+clears all the elements of the table/array at position idx in the stack.
 
 
 
 
 
 
@@ -120,7 +120,7 @@ clears all the element of the table/array at position idx in the stack.
     :param SQInteger idx: index of the target object in the stack
     :param SQInteger idx: index of the target object in the stack
     :returns: a SQRESULT
     :returns: a SQRESULT
 
 
-Clones the table, array or class instance at the position idx, clones it and pushes the new object in the stack.
+pushes a clone of the table, array, or class instance at the position idx.
 
 
 
 
 
 

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

@@ -105,7 +105,7 @@ returns the stack informations of a given call stack level. returns a table form
         }
         }
     }
     }
 
 
-level = 0 is the current function, level = 1 is the caller and so on. If the stack level doesn't exist the function returns null.
+level = 0 is getstackinfos() itself! level = 1 is the current function, level = 2 is the caller of the current function, and so on. If the stack level doesn't exist the function returns null.
 
 
 .. js:function:: newthread(threadfunc)
 .. js:function:: newthread(threadfunc)
 
 

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

@@ -46,7 +46,7 @@ For instance: ::
 
 
     }
     }
 
 
-the previous code examples is a syntactic sugar for: ::
+the previous code example is a syntactic sugar for: ::
 
 
     Foo <- class {
     Foo <- class {
         //constructor
         //constructor
@@ -67,7 +67,7 @@ the previous code examples is a syntactic sugar for: ::
 
 
     }
     }
 
 
-in order to emulate namespaces, is also possible to declare something like this::
+in order to emulate namespaces, it is also possible to declare something like this::
 
 
     //just 2 regular nested tables
     //just 2 regular nested tables
     FakeNamespace <- {
     FakeNamespace <- {

+ 6 - 6
doc/source/reference/language/expressions.rst

@@ -221,10 +221,10 @@ Bitwise Operators
     exp:= 'exp' op 'exp'
     exp:= 'exp' op 'exp'
     exp := '~' exp
     exp := '~' exp
 
 
-Squirrel supports the standard c-like bit wise operators ``&, |, ^, ~, <<, >>`` plus the unsigned
-right shift operator ``<<<``. The unsigned right shift works exactly like the normal right shift operator(``<<``)
+Squirrel supports the standard C-like bitwise operators ``&, |, ^, ~, <<, >>`` plus the unsigned
+right shift operator ``>>>``. The unsigned right shift works exactly like the normal right shift operator(``>>``)
 except for treating the left operand as an unsigned integer, so is not affected by the sign. Those operators
 except for treating the left operand as an unsigned integer, so is not affected by the sign. Those operators
-only work on integers values, passing of any other operand type to these operators will
+only work on integer values; passing of any other operand type to these operators will
 cause an exception.
 cause an exception.
 
 
 ^^^^^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^^^^^
@@ -255,7 +255,7 @@ Operators precedence
 +---------------------------------------+-----------+
 +---------------------------------------+-----------+
 | ``+=, =, -=``                         | ...       |
 | ``+=, =, -=``                         | ...       |
 +---------------------------------------+-----------+
 +---------------------------------------+-----------+
-| ``,(comma operator)``                 | lowest    |
+| ``, (comma operator)``                | lowest    |
 +---------------------------------------+-----------+
 +---------------------------------------+-----------+
 
 
 .. _table_contructor:
 .. _table_contructor:
@@ -293,7 +293,7 @@ A new slot with exp1 as key and exp2 as value is created::
         [1]="I'm the value"
         [1]="I'm the value"
     }
     }
 
 
-both syntaxes can be mixed::
+Both syntaxes can be mixed::
 
 
     local table=
     local table=
     {
     {
@@ -369,6 +369,6 @@ Creates a new array.::
 
 
     a <- [] //creates an empty array
     a <- [] //creates an empty array
 
 
-arrays can be initialized with values during the construction::
+Arrays can be initialized with values during the construction::
 
 
     a <- [1,"string!",[],{}] //creates an array with 4 elements
     a <- [1,"string!",[],{}] //creates an array with 4 elements

+ 4 - 4
squirrel/sqapi.cpp

@@ -510,7 +510,7 @@ SQRESULT sq_setclosureroot(HSQUIRRELVM v,SQInteger idx)
         v->Pop();
         v->Pop();
         return SQ_OK;
         return SQ_OK;
     }
     }
-    return sq_throwerror(v, _SC("ivalid type"));
+    return sq_throwerror(v, _SC("invalid type"));
 }
 }
 
 
 SQRESULT sq_getclosureroot(HSQUIRRELVM v,SQInteger idx)
 SQRESULT sq_getclosureroot(HSQUIRRELVM v,SQInteger idx)
@@ -558,7 +558,7 @@ SQRESULT sq_setroottable(HSQUIRRELVM v)
         v->Pop();
         v->Pop();
         return SQ_OK;
         return SQ_OK;
     }
     }
-    return sq_throwerror(v, _SC("ivalid type"));
+    return sq_throwerror(v, _SC("invalid type"));
 }
 }
 
 
 SQRESULT sq_setconsttable(HSQUIRRELVM v)
 SQRESULT sq_setconsttable(HSQUIRRELVM v)
@@ -569,7 +569,7 @@ SQRESULT sq_setconsttable(HSQUIRRELVM v)
         v->Pop();
         v->Pop();
         return SQ_OK;
         return SQ_OK;
     }
     }
-    return sq_throwerror(v, _SC("ivalid type, expected table"));
+    return sq_throwerror(v, _SC("invalid type, expected table"));
 }
 }
 
 
 void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p)
 void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p)
@@ -1164,7 +1164,7 @@ SQRESULT sq_call(HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool raiseerror)
     if(v->Call(v->GetUp(-(params+1)),params,v->_top-params,res,raiseerror?true:false)){
     if(v->Call(v->GetUp(-(params+1)),params,v->_top-params,res,raiseerror?true:false)){
 
 
         if(!v->_suspended) {
         if(!v->_suspended) {
-            v->Pop(params);//pop closure and args
+            v->Pop(params);//pop args
         }
         }
         if(retval){
         if(retval){
             v->Push(res); return SQ_OK;
             v->Push(res); return SQ_OK;